diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index fb81e1e3..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,148 +0,0 @@ -version: 2 -references: - - common_env_vars: &common_env_vars - environment: - - MYSQL_ROOT_HOST: "%" - - common: &common - working_directory: ~/repo - steps: - - checkout - - - restore_cache: - keys: - - v1-dependencies-{{ checksum "composer.json" }} - - v1-dependencies- - - - run: - name: Install Composer Dependencies - command: composer install -n --prefer-dist - - - save_cache: - paths: - - ./vendor - key: v1-dependencies-{{ checksum "composer.json" }} - - - run: - name: Check Coding Standards - command: composer run-script check-cs-errors - - - run: - name: Install PHP Unit Tests - command: composer run-script tests-install - - - run: - name: Run PHP Unit Tests - command: | - if [ ! -z "${CC_TEST_REPORTER_ID}" ] && [ "test-php-73" == "${CIRCLE_JOB}" ]; then - /cc-test-reporter before-build - export COMPOSER_PROCESS_TIMEOUT=1200 - composer run-script tests-run -- --coverage-clover clover.xml - /cc-test-reporter after-build --coverage-input-type clover --exit-code $? - else - composer run-script tests-run - fi - -jobs: - test-php-71: - docker: - - image: thomasplevy/llms-testing-env:php71 - <<: [ *common_env_vars ] - <<: [ *common ] - - test-php-72: - docker: - - image: thomasplevy/llms-testing-env:php72 - <<: [ *common_env_vars ] - <<: [ *common ] - - test-php-73: - docker: - - image: thomasplevy/llms-testing-env:php73 - <<: [ *common_env_vars ] - <<: [ *common ] - - test-openapi-spec: - docker: - - image: circleci/node:lts - working_directory: ~/repo - steps: - - checkout - - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - # - v1-dependencies- - - - run: - name: Update npm - command: 'sudo npm install -g npm@latest' - - - run: - name: Install Dependencies - command: npm install - - - run: - name: Run Tests - command: npm run test - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - - persist_to_workspace: - root: ~/repo - paths: . - - deploy-gh-pages: - docker: - - image: circleci/node:lts - working_directory: ~/repo - steps: - - add_ssh_keys: - fingerprints: - - "77:bf:34:73:f8:80:cd:45:26:e0:49:d1:e0:5a:3b:9f" - - attach_workspace: - at: ~/repo - - run: - name: Setup known_hosts - command: ssh-keyscan github.com >> ~/.ssh/known_hosts - - run: - name: Build Docs - command: npm run build - - run: - name: Deploy docs - command: | - git config user.email "circleci@lifterlms.com" - git config user.name "CircleCI Deployment" - npm run gh-pages - -workflows: - version: 2 - test-and-deploy: - jobs: - - test-php-71: - filters: - branches: - only: /.*/ - - test-php-72: - filters: - branches: - only: /.*/ - - test-php-73: - filters: - branches: - only: /.*/ - - test-openapi-spec: - filters: - branches: - only: /.*/ - - deploy-gh-pages: - requires: - - test-openapi-spec - filters: - branches: - only: - - master diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index ca00369c..00000000 --- a/.editorconfig +++ /dev/null @@ -1,23 +0,0 @@ -# This file is for unifying the coding style for different editors and IDEs -# editorconfig.org - -# WordPress Coding Standards -# http://make.wordpress.org/core/handbook/coding-standards/ - -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -tab_width = 4 -indent_style = tab -insert_final_newline = true -trim_trailing_whitespace = true - -[*.txt] -trim_trailing_whitespace = false - -[*.{md,json,yml,yaml}] -indent_style = space -indent_size = 2 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7175b95a..00000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -vendor/ -node_modules/ -dist/ -tmp/ -web_deploy/ diff --git a/.llmsconfig b/.llmsconfig deleted file mode 100644 index e9476c6a..00000000 --- a/.llmsconfig +++ /dev/null @@ -1,31 +0,0 @@ -{ - "package_name": "LifterLMS_REST_API", - "pot": { - "domain": "lifterlms", - "js": false - }, - "publish": { - "title": "LifterLMS REST API", - "lifterlms": { - "make": { - "tags": [ 48 ] - }, - "slug": "lifterlms-rest", - "pot": false - }, - "svn": false - }, - "scaffold": { - "shortname": "REST", - "package_main": "LifterLMS_REST", - "testcase_class_name": "LLMS_REST_Unit_Test_Case_Base" - }, - "zip": { - "src": { - "custom": [ - "!./spec/**", - "!./web/**" - ] - } - } -} diff --git a/README.md b/README.md deleted file mode 100644 index 044c924f..00000000 --- a/README.md +++ /dev/null @@ -1,34 +0,0 @@ -LifterLMS REST API -================== - -[![CircleCI](https://circleci.com/gh/gocodebox/lifterlms-rest.svg?style=svg)](https://circleci.com/gh/gocodebox/lifterlms-rest) -[![Maintainability](https://api.codeclimate.com/v1/badges/e284255ac949d5764421/maintainability)](https://codeclimate.com/github/gocodebox/lifterlms-rest/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/e284255ac949d5764421/test_coverage)](https://codeclimate.com/github/gocodebox/lifterlms-rest/test_coverage) - -A REST API feature plugin for [LifterLMS](https://github.com/gocodebox/lifterlms). - -**This specification (and repository) is currently under construction. It is not yet a functional API.** - -## Contributing [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](.github/CONTRIBUTING.md) - -We are looking for both API specification designers and developers interested in contributing. The best way to contribute is to join us in `#developers` on the official [LifterLMS Slack community](https://lifterlms.com/slack). - -## Specification & Documentation - -The LifterLMS REST API follows the [OpenAPI Specification (Version 3.0.0)](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md). - -REST API documentation is available at [gocodebox.github.io/lifterlms-rest/](https://gocodebox.github.io/lifterlms-rest/). - -The full OpenAPI spec can be downloaded in [json](https://gocodebox.github.io/lifterlms-rest/openapi.json) or [yaml](https://gocodebox.github.io/lifterlms-rest/openapi.yaml) formats. - -## Building & Developing REST API Doc spec - -This repo uses [ReDoc](https://github.com/Rebilly/ReDoc). - -To build the docs locally for development: - -+ `npm install` in the repo root. -+ `npm start`: Starts the development server. -+ `npm run build`: Bundles the spec and prepares web_deploy folder with static assets. -+ `npm test`: Validates the spec. -+ `npm run gh-pages`: Deploys docs to GitHub Pages. You don't need to run it manually if you have Travis CI configured. diff --git a/composer.json b/composer.json deleted file mode 100644 index 0b02c0dd..00000000 --- a/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "lifterlms/lifterlms-rest", - "description": "REST API feature plugin for the LifterLMS Core.", - "type": "wordpress-plugin", - "license": "GPL-3.0", - "authors": [ - { - "name": "Team LifterLMS", - "email": "team@lifterlms.com" - } - ], - "minimum-stability": "dev", - "require": {}, - "require-dev": { - "lifterlms/lifterlms-tests": "dev-master", - "lifterlms/lifterlms-cs": "dev-master" - }, - "scripts": { - "config-cs": [ - "\"vendor/bin/phpcs\" --config-set installed_paths ../../../vendor/wp-coding-standards/wpcs,../../../vendor/lifterlms/lifterlms-cs,../../../vendor/phpcompatibility/php-compatibility,../../../vendor/phpcompatibility/phpcompatibility-paragonie,../../../vendor/phpcompatibility/phpcompatibility-wp", - "\"vendor/bin/phpcs\" --config-set default_standard LifterLMS" - ], - "check-cs": [ - "\"vendor/bin/phpcs\" --colors" - ], - "check-cs-errors": [ - "\"vendor/bin/phpcs\" --colors --error-severity=1 --warning-severity=6" - ], - "fix-cs": [ - "\"vendor/bin/phpcbf\"" - ], - "post-install-cmd": [ - "composer config-cs" - ], - "post-update-cmd": [ - "composer config-cs" - ], - "tests-install": [ - "vendor/bin/llms-tests teardown llms_rest_tests root password 127.0.0.1", - "vendor/bin/llms-tests install llms_rest_tests root password 127.0.0.1", - "vendor/bin/llms-tests plugin https://github.com/gocodebox/lifterlms.git" - ], - "tests-run": [ - "vendor/bin/phpunit" - ] - } -} diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 7ea55db1..00000000 --- a/composer.lock +++ /dev/null @@ -1,2271 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "516383093c6d5adb87af835f2b25371a", - "packages": [], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "7c71fc2932158d00f24f10635bf3b3b8b6ee5b68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/7c71fc2932158d00f24f10635bf3b3b8b6ee5b68", - "reference": "7c71fc2932158d00f24f10635bf3b3b8b6ee5b68", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2019-07-02T13:37:32+00:00" - }, - { - "name": "lifterlms/lifterlms-cs", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/gocodebox/lifterlms-cs.git", - "reference": "44e4295133b35f98931abe1d5195b4e4d1723161" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/gocodebox/lifterlms-cs/zipball/44e4295133b35f98931abe1d5195b4e4d1723161", - "reference": "44e4295133b35f98931abe1d5195b4e4d1723161", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "phpcompatibility/phpcompatibility-wp": "^2.0.0", - "phpmd/phpmd": "^2.6.0", - "squizlabs/php_codesniffer": "^3.3.2", - "wp-coding-standards/wpcs": "2.1.1" - }, - "require-dev": { - "phpcompatibility/php-compatibility": "^9.0.0", - "roave/security-advisories": "dev-master" - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Team LifterLMS", - "email": "help@lifterlms.com" - } - ], - "description": "PHP_CodeSniffer rules for LifterLMS projects", - "time": "2019-07-24T17:28:41+00:00" - }, - { - "name": "lifterlms/lifterlms-tests", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/gocodebox/lifterlms-tests.git", - "reference": "c14de6c83ed65936eb3acc7a213b4778cf8d1cd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/gocodebox/lifterlms-tests/zipball/c14de6c83ed65936eb3acc7a213b4778cf8d1cd2", - "reference": "c14de6c83ed65936eb3acc7a213b4778cf8d1cd2", - "shasum": "" - }, - "require": { - "php": "^7.1", - "phpunit/phpunit": "^6" - }, - "bin": [ - "bin/llms-tests" - ], - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Team LifterLMS", - "email": "help@lifterlms.com" - } - ], - "description": "Testing framework for LifterLMS projects", - "time": "2019-08-09T01:13:25+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2019-04-07T13:18:21+00:00" - }, - { - "name": "pdepend/pdepend", - "version": "2.5.2", - "source": { - "type": "git", - "url": "https://github.com/pdepend/pdepend.git", - "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/9daf26d0368d4a12bed1cacae1a9f3a6f0adf239", - "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239", - "shasum": "" - }, - "require": { - "php": ">=5.3.7", - "symfony/config": "^2.3.0|^3|^4", - "symfony/dependency-injection": "^2.3.0|^3|^4", - "symfony/filesystem": "^2.3.0|^3|^4" - }, - "require-dev": { - "phpunit/phpunit": "^4.8|^5.7", - "squizlabs/php_codesniffer": "^2.0.0" - }, - "bin": [ - "src/bin/pdepend" - ], - "type": "library", - "autoload": { - "psr-4": { - "PDepend\\": "src/main/php/PDepend" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Official version of pdepend to be handled with Composer", - "time": "2017-12-13T13:21:38+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" - }, - { - "name": "phar-io/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" - }, - { - "name": "phpcompatibility/php-compatibility", - "version": "9.2.0", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "3db1bf1e28123fd574a4ae2e9a84072826d51b5e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/3db1bf1e28123fd574a4ae2e9a84072826d51b5e", - "reference": "3db1bf1e28123fd574a4ae2e9a84072826d51b5e", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" - }, - "conflict": { - "squizlabs/php_codesniffer": "2.6.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Contributors", - "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" - }, - { - "name": "Wim Godden", - "role": "lead", - "homepage": "https://github.com/wimg" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead", - "homepage": "https://github.com/jrfnl" - } - ], - "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", - "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", - "keywords": [ - "compatibility", - "phpcs", - "standards" - ], - "time": "2019-06-27T19:58:56+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "9160de79fcd683b5c99e9c4133728d91529753ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/9160de79fcd683b5c99e9c4133728d91529753ea", - "reference": "9160de79fcd683b5c99e9c4133728d91529753ea", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "paragonie", - "phpcs", - "polyfill", - "standards" - ], - "time": "2018-12-16T19:10:44+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/cb303f0067cd5b366a41d4fb0e254fb40ff02efd", - "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0", - "phpcompatibility/phpcompatibility-paragonie": "^1.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "phpcs", - "standards", - "wordpress" - ], - "time": "2018-10-07T18:31:37+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-04-30T17:48:53+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpmd/phpmd", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "7425e155cf22cdd2b4dd3458a7da4cf6c0201562" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/7425e155cf22cdd2b4dd3458a7da4cf6c0201562", - "reference": "7425e155cf22cdd2b4dd3458a7da4cf6c0201562", - "shasum": "" - }, - "require": { - "ext-xml": "*", - "pdepend/pdepend": "^2.5", - "php": ">=5.3.9" - }, - "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.0" - }, - "bin": [ - "src/bin/phpmd" - ], - "type": "project", - "autoload": { - "psr-0": { - "PHPMD\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Manuel Pichler", - "role": "Project Founder", - "email": "github@manuel-pichler.de", - "homepage": "https://github.com/manuelpichler" - }, - { - "name": "Other contributors", - "role": "Contributors", - "homepage": "https://github.com/phpmd/phpmd/graphs/contributors" - }, - { - "name": "Marc Würth", - "role": "Project Maintainer", - "email": "ravage@bluewin.ch", - "homepage": "https://github.com/ravage84" - } - ], - "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", - "homepage": "http://phpmd.org/", - "keywords": [ - "mess detection", - "mess detector", - "pdepend", - "phpmd", - "pmd" - ], - "time": "2019-07-05T23:07:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2019-06-13T12:50:23+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "5.3.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "83f09c29758c52e71bdb81ad2cc9124b85b5a4ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/83f09c29758c52e71bdb81ad2cc9124b85b5a4ef", - "reference": "83f09c29758c52e71bdb81ad2cc9124b85b5a4ef", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-xdebug": "^2.5.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-04-07T12:06:18+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2017-11-27T13:52:08+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "9513098641797ce5f459dbc1de5a54c29b0ec1fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/9513098641797ce5f459dbc1de5a54c29b0ec1fb", - "reference": "9513098641797ce5f459dbc1de5a54c29b0ec1fb", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2018-01-06T05:27:16+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "2.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "13eb9aba9626b1a3811c6a492acc9669d24bb85a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/13eb9aba9626b1a3811c6a492acc9669d24bb85a", - "reference": "13eb9aba9626b1a3811c6a492acc9669d24bb85a", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-11-27T08:47:38+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "6.5.14", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.9", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.5.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2019-02-01T05:22:47+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "13862f9c620ffbc8895792abe2a9e473326fb905" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/13862f9c620ffbc8895792abe2a9e473326fb905", - "reference": "13862f9c620ffbc8895792abe2a9e473326fb905", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5.11" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "abandoned": true, - "time": "2018-09-09T05:48:43+00:00" - }, - { - "name": "psr/container", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "014d250daebff39eba15ba990eeb2a140798e77c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/014d250daebff39eba15ba990eeb2a140798e77c", - "reference": "014d250daebff39eba15ba990eeb2a140798e77c", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2018-12-29T15:36:03+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5e860800beea5ea4c8590df866338c09c20d3a48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e860800beea5ea4c8590df866338c09c20d3a48", - "reference": "5e860800beea5ea4c8590df866338c09c20d3a48", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2019-07-02T07:44:03+00:00" - }, - { - "name": "sebastian/comparator", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-02-01T13:46:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "2.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "abcc70409ddfb310a8cb41ef0c2e857425438cf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/abcc70409ddfb310a8cb41ef0c2e857425438cf4", - "reference": "abcc70409ddfb310a8cb41ef0c2e857425438cf4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2017-12-14T11:32:19+00:00" - }, - { - "name": "sebastian/environment", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2017-07-01T08:51:00+00:00" - }, - { - "name": "sebastian/exporter", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "97cc7aeb5bbc21a59df4e4e9e976831fa1b41fbe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/97cc7aeb5bbc21a59df4e4e9e976831fa1b41fbe", - "reference": "97cc7aeb5bbc21a59df4e4e9e976831fa1b41fbe", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2019-07-02T07:44:27+00:00" - }, - { - "name": "sebastian/global-state", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2017-04-27T15:39:26+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "63e5a3e0881ebf28c9fbb2a2e12b77d373850c12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/63e5a3e0881ebf28c9fbb2a2e12b77d373850c12", - "reference": "63e5a3e0881ebf28c9fbb2a2e12b77d373850c12", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2019-07-02T07:43:46+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "3053ae3e6286fdf98769f18ec10894dbc6260a34" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/3053ae3e6286fdf98769f18ec10894dbc6260a34", - "reference": "3053ae3e6286fdf98769f18ec10894dbc6260a34", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2019-07-02T07:44:36+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "a58220ae18565f6004bbe15321efc4470bfe02fd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/a58220ae18565f6004bbe15321efc4470bfe02fd", - "reference": "a58220ae18565f6004bbe15321efc4470bfe02fd", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2019-07-02T07:43:54+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "886c16245e0d1ceaf16b3479d938c8665f6aa290" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/886c16245e0d1ceaf16b3479d938c8665f6aa290", - "reference": "886c16245e0d1ceaf16b3479d938c8665f6aa290", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2019-07-24T04:17:49+00:00" - }, - { - "name": "symfony/config", - "version": "4.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "864d387182ce69c62ec787bd7d67e6a44d1f5f21" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/864d387182ce69c62ec787bd7d67e6a44d1f5f21", - "reference": "864d387182ce69c62ec787bd7d67e6a44d1f5f21", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/filesystem": "^3.4|^4.0|^5.0", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<3.4" - }, - "require-dev": { - "symfony/event-dispatcher": "^3.4|^4.0|^5.0", - "symfony/finder": "^3.4|^4.0|^5.0", - "symfony/messenger": "^4.1|^5.0", - "symfony/service-contracts": "^1.1", - "symfony/yaml": "^3.4|^4.0|^5.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2019-07-18T10:38:27+00:00" - }, - { - "name": "symfony/dependency-injection", - "version": "4.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "b80addce8eaa96d06cf7e038248e0670df9347c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b80addce8eaa96d06cf7e038248e0670df9347c3", - "reference": "b80addce8eaa96d06cf7e038248e0670df9347c3", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/container": "^1.0", - "symfony/service-contracts": "^1.1.2" - }, - "conflict": { - "symfony/config": "<4.3", - "symfony/finder": "<3.4", - "symfony/proxy-manager-bridge": "<3.4", - "symfony/yaml": "<3.4" - }, - "provide": { - "psr/container-implementation": "1.0", - "symfony/service-implementation": "1.0" - }, - "require-dev": { - "symfony/config": "^4.3|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/yaml": "^3.4|^4.0|^5.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "https://symfony.com", - "time": "2019-07-23T11:21:51+00:00" - }, - { - "name": "symfony/filesystem", - "version": "4.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "4e3b24f00ff07ff1a5a1571cc79e655f6d757c6d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/4e3b24f00ff07ff1a5a1571cc79e655f6d757c6d", - "reference": "4e3b24f00ff07ff1a5a1571cc79e655f6d757c6d", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-ctype": "~1.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2019-07-03T11:25:24+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "82ebae02209c21113908c229e9883c419720738a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", - "reference": "82ebae02209c21113908c229e9883c419720738a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "time": "2019-02-06T07:57:58+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", - "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/container": "^1.0" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2019-06-13T11:15:36+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-12-25T11:19:39+00:00" - }, - { - "name": "wp-coding-standards/wpcs", - "version": "2.1.1", - "source": { - "type": "git", - "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "bd9c33152115e6741e3510ff7189605b35167908" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908", - "reference": "bd9c33152115e6741e3510ff7189605b35167908", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", - "phpcompatibility/php-compatibility": "^9.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Contributors", - "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", - "keywords": [ - "phpcs", - "standards", - "wordpress" - ], - "time": "2019-05-21T02:50:00+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": { - "lifterlms/lifterlms-tests": 20, - "lifterlms/lifterlms-cs": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js deleted file mode 100644 index c02171fd..00000000 --- a/gulpfile.js/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Main Gulp File - * - * Requires all task files - */ - -var gulp = require('gulp'), - requireDir = require( 'require-dir' ); - -require( 'lifterlms-lib-tasks' )( gulp ); -// requireDir( './tasks' ); diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index b76a4cf2..00000000 --- a/package-lock.json +++ /dev/null @@ -1,8562 +0,0 @@ -{ - "name": "lifterlms-rest", - "version": "1.0.0-beta.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/runtime": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", - "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.2" - } - }, - "@gulp-sourcemaps/identity-map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz", - "integrity": "sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ==", - "dev": true, - "requires": { - "acorn": "^5.0.3", - "css": "^2.2.1", - "normalize-path": "^2.1.1", - "source-map": "^0.6.0", - "through2": "^2.0.3" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@gulp-sourcemaps/map-sources": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", - "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", - "dev": true, - "requires": { - "normalize-path": "^2.0.1", - "through2": "^2.0.3" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "requires": { - "ansi-wrap": "^0.1.0" - } - }, - "ansi-cyan": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", - "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-red": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "any-shell-escape": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/any-shell-escape/-/any-shell-escape-0.1.1.tgz", - "integrity": "sha1-1Vq5ciRMcaml4asIefML8RCAaVk=", - "dev": true - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "append-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", - "dev": true, - "requires": { - "buffer-equal": "^1.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-filter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", - "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", - "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "array-initial": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", - "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", - "dev": true, - "requires": { - "array-slice": "^1.0.0", - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "array-last": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", - "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "array-sort": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", - "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", - "dev": true, - "requires": { - "default-compare": "^1.0.0", - "get-value": "^2.0.6", - "kind-of": "^5.0.2" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "async-done": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz", - "integrity": "sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.2", - "process-nextick-args": "^1.0.7", - "stream-exhaust": "^1.0.1" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true - }, - "async-settle": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", - "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", - "dev": true, - "requires": { - "async-done": "^1.2.2" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "8.6.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.5.tgz", - "integrity": "sha512-PLWJN3Xo/rycNkx+mp8iBDMTm3FeWe4VmYaZDSqL5QQB9sLsQkG5k8n+LNDFnhh9kdq2K+egL/icpctOmDHwig==", - "dev": true, - "requires": { - "browserslist": "^3.2.8", - "caniuse-lite": "^1.0.30000864", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.23", - "postcss-value-parser": "^3.2.3" - } - }, - "aws-sdk": { - "version": "2.485.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.485.0.tgz", - "integrity": "sha512-VTmsIPrf9yblghjM5P7hCUG9ysYB+m67mo6/laWeJeGWLxePwtfvVAjhmmXkOJIv0JFSwNfJJ5KpI3Mtu0avsQ==", - "dev": true, - "requires": { - "buffer": "4.9.1", - "events": "1.1.1", - "ieee754": "1.1.8", - "jmespath": "0.15.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "bach": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", - "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", - "dev": true, - "requires": { - "arr-filter": "^1.1.1", - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "array-each": "^1.0.0", - "array-initial": "^1.0.0", - "array-last": "^1.1.1", - "async-done": "^1.2.2", - "async-settle": "^1.0.0", - "now-and-later": "^2.0.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "better-ajv-errors": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.5.7.tgz", - "integrity": "sha512-O7tpXektKWVwYCH5g6Vs3lKD+sJs7JHh5guapmGJd+RTwxhFZEf4FwvbHBURUnoXsTeFaMvGuhTTmEGiHpNi6w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/runtime": "^7.0.0", - "chalk": "^2.4.1", - "core-js": "^2.5.7", - "json-to-ast": "^2.0.3", - "jsonpointer": "^4.0.1", - "leven": "^2.1.0" - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "binaryextensions": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-1.0.1.tgz", - "integrity": "sha1-HmN0iLNbWL2l9HdL+WpSEqjJB1U=", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - } - } - }, - "caniuse-lite": { - "version": "1.0.30000979", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000979.tgz", - "integrity": "sha512-gcu45yfq3B7Y+WB05fOMfr0EiSlq+1u+m6rPHyJli/Wy3PVQNGaU7VA4bZE5qw+AU2UVOBR/N5g1bzADUqdvFw==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "chokidar": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", - "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", - "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - }, - "dependencies": { - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - } - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-error-fragment": { - "version": "0.0.230", - "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", - "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-map": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", - "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", - "dev": true, - "requires": { - "arr-map": "^2.0.2", - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz", - "integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", - "dev": true, - "requires": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" - } - }, - "core-js": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", - "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "css": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", - "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "source-map": "^0.6.1", - "source-map-resolve": "^0.5.2", - "urix": "^0.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-fabulous": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", - "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", - "dev": true, - "requires": { - "debug": "3.X", - "memoizee": "0.4.X", - "object-assign": "4.X" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "default-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", - "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", - "dev": true, - "requires": { - "kind-of": "^5.0.2" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "default-resolution": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", - "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "dev": true - }, - "detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", - "dev": true - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "drange": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", - "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", - "dev": true - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "each-props": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", - "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.1", - "object.defaults": "^1.1.0" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.181", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.181.tgz", - "integrity": "sha512-xf1dCoc6FSCVcNQu8VGiMSH55rOT/ov6U7UpMgw4Erg5KfD1LHTXqm34/IGp55TLX4WqwuT4IIeJWhdGhO8mYw==", - "dev": true - }, - "email-addresses": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.0.3.tgz", - "integrity": "sha512-kUlSC06PVvvjlMRpNIl3kR1NRXLEe86VQ7N0bQeaCZb2g+InShCeHQp/JvyYNTugMnRN2NvJhHlc3q12MWbbpg==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es5-ext": { - "version": "0.10.50", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", - "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "^1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", - "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", - "dev": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "event-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-4.0.1.tgz", - "integrity": "sha512-qACXdu/9VHPBzcyhdOWR5/IahhGMf0roTeZJfzz077GwylcDd90yOHLouhmv7GJ5XzPi6ekaQWd8AvPP2nOvpA==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "from": "^0.1.7", - "map-stream": "0.0.7", - "pause-stream": "^0.0.11", - "split": "^1.0.1", - "stream-combiner": "^0.2.2", - "through": "^2.3.8" - } - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "faker": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz", - "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=", - "dev": true - }, - "fancy-log": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "parse-node-version": "^1.0.0", - "time-stamp": "^1.0.0" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "filename-reserved-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", - "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=", - "dev": true - }, - "filenamify": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", - "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", - "dev": true, - "requires": { - "filename-reserved-regex": "^1.0.0", - "strip-outer": "^1.0.0", - "trim-repeated": "^1.0.0" - } - }, - "filenamify-url": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz", - "integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=", - "dev": true, - "requires": { - "filenamify": "^1.0.0", - "humanize-url": "^1.0.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "findup": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/findup/-/findup-0.1.5.tgz", - "integrity": "sha1-itkpozk7rGJ5V6fl3kYjsGsOLOs=", - "dev": true, - "requires": { - "colors": "~0.6.0-1", - "commander": "~2.1.0" - } - }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "first-chunk-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", - "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "fork-stream": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/fork-stream/-/fork-stream-0.0.4.tgz", - "integrity": "sha1-24Sfznf2cIpfjzhq5TOgkHtUrnA=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "format-util": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.3.tgz", - "integrity": "sha1-Ay3KShFiYqEsQ/TD7IVmQWxbLZU=", - "dev": true - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", - "dev": true - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, - "fs-extra": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "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" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "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": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "requires": { - "globule": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "gh-pages": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.0.1.tgz", - "integrity": "sha512-uFlk3bukljeiWKQ2XvPfjcSi/ou7IfoDf2p+Fj672saLAr8bnOdFVqI/JSgrSgInKpCg5BksxEwGUl++dbg8Dg==", - "dev": true, - "requires": { - "async": "^2.6.1", - "commander": "^2.18.0", - "email-addresses": "^3.0.1", - "filenamify-url": "^1.0.0", - "fs-extra": "^7.0.0", - "globby": "^6.1.0", - "graceful-fs": "^4.1.11", - "rimraf": "^2.6.2" - }, - "dependencies": { - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - }, - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "glob-watcher": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", - "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-done": "^1.2.0", - "chokidar": "^2.0.0", - "is-negated-glob": "^1.0.0", - "just-debounce": "^1.0.0", - "object.defaults": "^1.1.0" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "globby": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", - "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", - "dev": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "graphlib": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.7.tgz", - "integrity": "sha512-TyI9jIy2J4j0qgPmOOrHTCtpPqJGN/aurBwc6ZT+bRii+di1I+Wv3obRhVrmBEXet+qkMaEX67dXrwsd3QQM6w==", - "dev": true, - "requires": { - "lodash": "^4.17.5" - } - }, - "gulp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", - "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", - "dev": true, - "requires": { - "glob-watcher": "^5.0.3", - "gulp-cli": "^2.2.0", - "undertaker": "^1.2.1", - "vinyl-fs": "^3.0.0" - }, - "dependencies": { - "gulp-cli": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", - "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", - "dev": true, - "requires": { - "ansi-colors": "^1.0.1", - "archy": "^1.0.0", - "array-sort": "^1.0.0", - "color-support": "^1.1.3", - "concat-stream": "^1.6.0", - "copy-props": "^2.0.1", - "fancy-log": "^1.3.2", - "gulplog": "^1.0.0", - "interpret": "^1.1.0", - "isobject": "^3.0.1", - "liftoff": "^3.1.0", - "matchdep": "^2.0.0", - "mute-stdout": "^1.0.0", - "pretty-hrtime": "^1.0.0", - "replace-homedir": "^1.0.0", - "semver-greatest-satisfied-range": "^1.1.0", - "v8flags": "^3.0.1", - "yargs": "^7.1.0" - } - } - } - }, - "gulp-autoprefixer": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/gulp-autoprefixer/-/gulp-autoprefixer-5.0.0.tgz", - "integrity": "sha1-gjfCeKaXdScKHK/n1vEBz81YVUQ=", - "dev": true, - "requires": { - "autoprefixer": "^8.0.0", - "fancy-log": "^1.3.2", - "plugin-error": "^1.0.1", - "postcss": "^6.0.1", - "through2": "^2.0.0", - "vinyl-sourcemaps-apply": "^0.2.0" - } - }, - "gulp-checktextdomain": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gulp-checktextdomain/-/gulp-checktextdomain-2.2.0.tgz", - "integrity": "sha512-2LonGRwSwzExOLu3dkHhWO1a+Qc2mT61sBb1xdTiCkiCsrcgis0nbs/0Iw/jUjWayLXf+Cp+D7fr0SnUE6Z/UQ==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "fs-extra": "^0.26.7", - "php-parser": "^2.0.6", - "plugin-error": "^1.0.1", - "ramda": "^0.20.0", - "text-table": "^0.2.0", - "through2": "^2.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "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" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "gulp-composer": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/gulp-composer/-/gulp-composer-0.4.5.tgz", - "integrity": "sha512-k4Wep10UwqX1mKFWGaKTIJp1isuAyE+Y3OZccUCAMPvwbppNc6pYKfer25gZI82N/GYHlLKas67dRDv1SrdDVQ==", - "dev": true, - "requires": { - "ansi-colors": "^1.0.1", - "fancy-log": "^1.3.2", - "plugin-error": "^1.0.0", - "shelljs": "~0.2.6", - "through2": "^3.0.1" - }, - "dependencies": { - "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, - "requires": { - "readable-stream": "2 || 3" - } - } - } - }, - "gulp-filter": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", - "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", - "dev": true, - "requires": { - "multimatch": "^2.0.0", - "plugin-error": "^0.1.2", - "streamfilter": "^1.0.5" - }, - "dependencies": { - "arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - } - }, - "arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", - "dev": true - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", - "dev": true, - "requires": { - "kind-of": "^1.1.0" - } - }, - "kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", - "dev": true - }, - "plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", - "dev": true, - "requires": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - } - } - } - }, - "gulp-git": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/gulp-git/-/gulp-git-2.9.0.tgz", - "integrity": "sha512-66ZCwlCCf0YXEUedDbx76p0ii6aQ6aUHC4oSytn3UM8J6VWJKYF4PBARMIgR/POGWyYeN7hjd81Elpjn/o4+Tg==", - "dev": true, - "requires": { - "any-shell-escape": "^0.1.1", - "fancy-log": "^1.3.2", - "lodash.template": "^4.4.0", - "plugin-error": "^1.0.1", - "require-dir": "^1.0.0", - "strip-bom-stream": "^3.0.0", - "through2": "^2.0.3", - "vinyl": "^2.0.1" - }, - "dependencies": { - "require-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-1.2.0.tgz", - "integrity": "sha512-LY85DTSu+heYgDqq/mK+7zFHWkttVNRXC9NKcKGyuGLdlsfbjEPrIEYdCVrx6hqnJb+xSu3Lzaoo8VnmOhhjNA==", - "dev": true - } - } - }, - "gulp-if": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/gulp-if/-/gulp-if-2.0.2.tgz", - "integrity": "sha1-pJe351cwBQQcqivIt92jyARE1ik=", - "dev": true, - "requires": { - "gulp-match": "^1.0.3", - "ternary-stream": "^2.0.1", - "through2": "^2.0.1" - } - }, - "gulp-include": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/gulp-include/-/gulp-include-2.4.1.tgz", - "integrity": "sha512-ARF7H6CD/CCavOcvlLhs6sAY+turxI72Gwp+5X/sMNUha8eJXFloDaZ93nnSKIh0K8VR7b7PURHdXrIhFhQ9gg==", - "dev": true, - "requires": { - "ansi-colors": "^3.2.4", - "event-stream": "^4.0.1", - "glob": "^7.1.3", - "plugin-error": "^1.0.1", - "source-map": "^0.7.3", - "strip-bom": "^2.0.0", - "vinyl": "^2.2.0", - "vinyl-sourcemaps-apply": "^0.2.1" - }, - "dependencies": { - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } - } - }, - "gulp-match": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/gulp-match/-/gulp-match-1.0.3.tgz", - "integrity": "sha1-kcfA1/Kb7NZgbVfYCn+Hdqh6uo4=", - "dev": true, - "requires": { - "minimatch": "^3.0.3" - } - }, - "gulp-rename": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz", - "integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==", - "dev": true - }, - "gulp-replace": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-0.6.1.tgz", - "integrity": "sha1-Eb+Mj85TPjPi9qjy9DC5VboL4GY=", - "dev": true, - "requires": { - "istextorbinary": "1.0.2", - "readable-stream": "^2.0.1", - "replacestream": "^4.0.0" - } - }, - "gulp-rtlcss": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/gulp-rtlcss/-/gulp-rtlcss-1.4.0.tgz", - "integrity": "sha512-66UmUSacTzdV3L0KcsdwzExEu1+dTfNlq3emUZGgHPLgUaCrsZUgZwjsgKjPwkYJUZOucLpjOxAkB37k+H80Kw==", - "dev": true, - "requires": { - "plugin-error": "^1.0.1", - "rtlcss": "^2.4.0", - "through2": "^2.0.5", - "vinyl-sourcemaps-apply": "^0.2.1" - } - }, - "gulp-run": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/gulp-run/-/gulp-run-1.7.1.tgz", - "integrity": "sha1-4XwKy3wwtuKu7iPAREKpbAys7/o=", - "dev": true, - "requires": { - "gulp-util": "^3.0.0", - "lodash.defaults": "^4.0.1", - "lodash.template": "^4.0.2", - "vinyl": "^0.4.6" - }, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "^0.2.0", - "clone-stats": "^0.0.1" - } - } - } - }, - "gulp-sass": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-4.0.2.tgz", - "integrity": "sha512-q8psj4+aDrblJMMtRxihNBdovfzGrXJp1l4JU0Sz4b/Mhsi2DPrKFYCGDwjIWRENs04ELVHxdOJQ7Vs98OFohg==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "lodash.clonedeep": "^4.3.2", - "node-sass": "^4.8.3", - "plugin-error": "^1.0.1", - "replace-ext": "^1.0.0", - "strip-ansi": "^4.0.0", - "through2": "^2.0.0", - "vinyl-sourcemaps-apply": "^0.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "gulp-sort": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/gulp-sort/-/gulp-sort-2.0.0.tgz", - "integrity": "sha1-xnYqLx8N4KP8WVohWZ0/rI26Gso=", - "dev": true, - "requires": { - "through2": "^2.0.1" - } - }, - "gulp-sourcemaps": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz", - "integrity": "sha512-SYLBRzPTew8T5Suh2U8jCSDKY+4NARua4aqjj8HOysBh2tSgT9u4jc1FYirAdPx1akUxxDeK++fqw6Jg0LkQRg==", - "dev": true, - "requires": { - "@gulp-sourcemaps/identity-map": "1.X", - "@gulp-sourcemaps/map-sources": "1.X", - "acorn": "5.X", - "convert-source-map": "1.X", - "css": "2.X", - "debug-fabulous": "1.X", - "detect-newline": "2.X", - "graceful-fs": "4.X", - "source-map": "~0.6.0", - "strip-bom-string": "1.X", - "through2": "2.X" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "gulp-uglify": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz", - "integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "extend-shallow": "^3.0.2", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "isobject": "^3.0.1", - "make-error-cause": "^1.1.1", - "safe-buffer": "^5.1.2", - "through2": "^2.0.0", - "uglify-js": "^3.0.5", - "vinyl-sourcemaps-apply": "^0.2.0" - } - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "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" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "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": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "gulp-vinyl-zip": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.2.tgz", - "integrity": "sha512-wJn09jsb8PyvUeyFF7y7ImEJqJwYy40BqL9GKfJs6UGpaGW9A+N68Q+ajsIpb9AeR6lAdjMbIdDPclIGo1/b7Q==", - "dev": true, - "requires": { - "event-stream": "3.3.4", - "queue": "^4.2.1", - "through2": "^2.0.3", - "vinyl": "^2.0.2", - "vinyl-fs": "^3.0.3", - "yauzl": "^2.2.1", - "yazl": "^2.2.1" - }, - "dependencies": { - "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "dev": true, - "requires": { - "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" - } - }, - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", - "dev": true - }, - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "dev": true, - "requires": { - "through": "2" - } - }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "dev": true, - "requires": { - "duplexer": "~0.1.1" - } - } - } - }, - "gulp-wp-pot": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/gulp-wp-pot/-/gulp-wp-pot-2.3.5.tgz", - "integrity": "sha512-lRZZkuEBrYTPj3j9iOWK3YdtcRH857gxMMLKoboVjtY8G5l7iOxsyza50rsA8XvmPQ8hlSuMNA0zd17oT/ybqQ==", - "dev": true, - "requires": { - "plugin-error": "^1.0.1", - "through2": "^3.0.1", - "vinyl": "^2.2.0", - "wp-pot": "^1.7.1" - }, - "dependencies": { - "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, - "requires": { - "readable-stream": "2 || 3" - } - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "http2-client": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.2.tgz", - "integrity": "sha512-CY9yoIetaoblM5CTrzHc7mJvH1Fo9/XmO6kxRkTCnWbSPq5brQYbtJ7hJrI5nKMYpyqPJYdPN9mkQbRBVvsoSQ==", - "dev": true - }, - "humanize-url": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz", - "integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=", - "dev": true, - "requires": { - "normalize-url": "^1.0.0", - "strip-url-auth": "^1.0.0" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", - "dev": true - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istextorbinary": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-1.0.2.tgz", - "integrity": "sha1-rOGTVNGpoBc+/rEITOD4ewrX3s8=", - "dev": true, - "requires": { - "binaryextensions": "~1.0.0", - "textextensions": "~1.0.0" - } - }, - "jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", - "dev": true - }, - "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "json-pointer": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.0.tgz", - "integrity": "sha1-jlAFUKaqxUZKRzN32leqbMIoKNc=", - "dev": true, - "requires": { - "foreach": "^2.0.4" - } - }, - "json-refs": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/json-refs/-/json-refs-3.0.13.tgz", - "integrity": "sha512-/FJ+BJ6BASjmNsBJHE8qMVj46HTS2Pfq5gI5BQRhyUsdrw9HaHRWSOsOh87deTOyWMtGas5Qr8H6ikrcWHdZbw==", - "dev": true, - "requires": { - "commander": "~2.19.0", - "graphlib": "^2.1.7", - "js-yaml": "^3.13.0", - "lodash": "^4.17.11", - "native-promise-only": "^0.8.1", - "path-loader": "^1.0.10", - "slash": "^2.0.0", - "uri-js": "^4.2.2" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - } - } - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-faker": { - "version": "0.5.0-rc17", - "resolved": "https://registry.npmjs.org/json-schema-faker/-/json-schema-faker-0.5.0-rc17.tgz", - "integrity": "sha512-ZQSLPpnsGiMBuPOHi09cAzhsiIeOcs5im2GAQ2P6XKyWOuetO8eYdYCP/kW7VVU891Ucan0/dl8GYbRA6pf9gw==", - "dev": true, - "requires": { - "json-schema-ref-parser": "^6.0.2", - "jsonpath": "^1.0.1", - "randexp": "^0.5.3" - } - }, - "json-schema-ref-parser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz", - "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.12.1", - "ono": "^4.0.11" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json-to-ast": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", - "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", - "dev": true, - "requires": { - "code-error-fragment": "0.0.230", - "grapheme-splitter": "^1.0.4" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonpath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.0.2.tgz", - "integrity": "sha512-rmzlgFZiQPc6q4HDyK8s9Qb4oxBnI5sF61y/Co5PV0lc3q2bIuRsNdueVbhoSHdKM4fxeimphOAtfz47yjCfeA==", - "dev": true, - "requires": { - "esprima": "1.2.2", - "static-eval": "2.0.2", - "underscore": "1.7.0" - }, - "dependencies": { - "esprima": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", - "integrity": "sha1-dqD9Zvz+FU/SkmZ9wmQBl1CxZXs=", - "dev": true - } - } - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "just-debounce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", - "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "last-run": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", - "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", - "dev": true, - "requires": { - "default-resolution": "^2.0.0", - "es6-weak-map": "^2.0.1" - } - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", - "dev": true, - "requires": { - "flush-write-stream": "^1.0.2" - } - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lifterlms-lib-tasks": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/lifterlms-lib-tasks/-/lifterlms-lib-tasks-3.5.1.tgz", - "integrity": "sha512-VTzvXYrxBpgXGFp5297kyWS1XvcdCS7uFD1gNRTKiZlcRdA3wvJbn15EYzTFiMYcTrSHwqi9HiOeIxX1iDz/Eg==", - "dev": true, - "requires": { - "ansi-colors": "^1.1.0", - "aws-sdk": "^2.481.0", - "fancy-log": "^1.3.3", - "globby": "^8.0.2", - "gulp": "^4.0.2", - "gulp-autoprefixer": "^5.0.0", - "gulp-checktextdomain": "^2.2.0", - "gulp-cli": "^2.2.0", - "gulp-composer": "^0.4.5", - "gulp-filter": "^5.1.0", - "gulp-git": "^2.9.0", - "gulp-if": "^2.0.2", - "gulp-include": "^2.4.1", - "gulp-rename": "^1.4.0", - "gulp-replace": "^0.6.1", - "gulp-rtlcss": "^1.4.0", - "gulp-run": "^1.7.1", - "gulp-sass": "^4.0.2", - "gulp-sort": "^2.0.0", - "gulp-sourcemaps": "^2.6.5", - "gulp-uglify": "^3.0.2", - "gulp-vinyl-zip": "^2.1.2", - "gulp-wp-pot": "^2.3.5", - "inquirer": "^5.2.0", - "markdown-html": "0.0.8", - "merge": "^1.2.1", - "node-svn-ultimate": "^1.2.0", - "node-version-compare": "^1.0.2", - "normalize.css": "^8.0.1", - "pump": "^1.0.3", - "request": "^2.88.0", - "rimraf": "^2.6.3", - "semver": "^5.7.0", - "showdown": "^1.9.0", - "yargs": "^12.0.5" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - }, - "dependencies": { - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "gulp-cli": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", - "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", - "dev": true, - "requires": { - "ansi-colors": "^1.0.1", - "archy": "^1.0.0", - "array-sort": "^1.0.0", - "color-support": "^1.1.3", - "concat-stream": "^1.6.0", - "copy-props": "^2.0.1", - "fancy-log": "^1.3.2", - "gulplog": "^1.0.0", - "interpret": "^1.1.0", - "isobject": "^3.0.1", - "liftoff": "^3.1.0", - "matchdep": "^2.0.0", - "mute-stdout": "^1.0.0", - "pretty-hrtime": "^1.0.0", - "replace-homedir": "^1.0.0", - "semver-greatest-satisfied-range": "^1.1.0", - "v8flags": "^3.0.1", - "yargs": "^7.1.0" - }, - "dependencies": { - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "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": "^5.0.0" - } - } - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "pump": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", - "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - } - } - }, - "liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", - "dev": true, - "requires": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - } - }, - "livereload": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.8.0.tgz", - "integrity": "sha512-Hi5Na6VIK3e8zlgOS50fu+iOTKWj5hM0BE7NKpZkwnfWTnktTjA38ZUXa2NlJww8/GrdVhpnxdqlLad5fkO27g==", - "dev": true, - "requires": { - "chokidar": "^2.1.5", - "opts": ">= 1.2.0", - "ws": "^1.1.5" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "dev": true, - "requires": { - "lodash._reinterpolate": "~3.0.0", - "lodash.templatesettings": "^4.0.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "dev": true, - "requires": { - "lodash._reinterpolate": "~3.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", - "dev": true, - "requires": { - "es5-ext": "~0.10.2" - } - }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "make-error-cause": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", - "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", - "dev": true, - "requires": { - "make-error": "^1.2.0" - } - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", - "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "markdown-html": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/markdown-html/-/markdown-html-0.0.8.tgz", - "integrity": "sha1-TR1C1KAmITbvIjBryVQg1jD5FUk=", - "dev": true, - "requires": { - "marked": "^0.3.2", - "mu2": "~0.5.14", - "optimist": "~0.3.4" - } - }, - "marked": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", - "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", - "dev": true - }, - "matchdep": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", - "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", - "dev": true, - "requires": { - "findup-sync": "^2.0.0", - "micromatch": "^3.0.4", - "resolve": "^1.4.0", - "stack-trace": "0.0.10" - }, - "dependencies": { - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "matched": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/matched/-/matched-3.0.1.tgz", - "integrity": "sha512-HW3qvcGvaFz36xnFanvwHNCiKZomvOcxV0w3nIq8Zy7pEm8JXNY1t6roKBx03l03bgYb7JWLg+k1lloeI/ZPkg==", - "dev": true, - "requires": { - "glob": "^7.1.3", - "is-glob": "^4.0.0" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "memoizee": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", - "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.45", - "es6-weak-map": "^2.0.2", - "event-emitter": "^0.3.5", - "is-promise": "^2.1", - "lru-queue": "0.1", - "next-tick": "1", - "timers-ext": "^0.1.5" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "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": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", - "dev": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "merge2": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", - "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "dev": true, - "requires": { - "mime-db": "1.40.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "mu2": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/mu2/-/mu2-0.5.21.tgz", - "integrity": "sha1-iIqPD9kOsc/anbgUdvbhmcyeWNM=", - "dev": true - }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" - } - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, - "mute-stdout": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", - "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "native-promise-only": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", - "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", - "dev": true - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", - "dev": true - }, - "node-fetch-h2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", - "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", - "dev": true, - "requires": { - "http2-client": "^1.2.5" - } - }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", - "dev": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - } - } - }, - "node-sass": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", - "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", - "dev": true, - "requires": { - "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": "^4.17.11", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.13.2", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "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" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "node-svn-ultimate": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/node-svn-ultimate/-/node-svn-ultimate-1.2.0.tgz", - "integrity": "sha512-+RQCHJYZU3RL/FXxcgX7nyt/OZEMNtcXLxf/mJJYeu0BIc8aOg2CCN33IY3Gu7kXD/xDpUqchbCLLBbVjN8DjA==", - "dev": true, - "requires": { - "fs-extra": "^1.0.0", - "semver": "^5.3.0", - "uuid": "^3.0.0", - "xml2js": "^0.4.17" - }, - "dependencies": { - "fs-extra": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", - "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0" - } - } - } - }, - "node-version-compare": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/node-version-compare/-/node-version-compare-1.0.2.tgz", - "integrity": "sha512-OVcHSPS3nROlBQXcALptOR0j2lOabC9wE2S+y+Fvr7nSDqoO/LCNzRdVGVovipeHUXs5jAqq7GelWE1X4J1sEw==", - "dev": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "prepend-http": "^1.0.0", - "query-string": "^4.1.0", - "sort-keys": "^1.0.0" - } - }, - "normalize.css": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz", - "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==", - "dev": true - }, - "now-and-later": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "dev": true, - "requires": { - "once": "^1.3.2" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oas-kit-common": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.7.tgz", - "integrity": "sha512-8+P8gBjN9bGfa5HPgyefO78o394PUwHoQjuD4hM0Bpl56BkcxoyW4MpWMPM6ATm+yIIz4qT1igmuVukUtjP/pQ==", - "dev": true, - "requires": { - "safe-json-stringify": "^1.2.0" - } - }, - "oas-linter": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-1.0.8.tgz", - "integrity": "sha512-d60OArJNBalU5q9utXgsWUdxNS2EWenLp/fSrCQXFHoZhFOLQDTCh2CeqddifM0q1Q0Z9noTiFnwuyqSi2Pa6A==", - "dev": true, - "requires": { - "js-yaml": "^3.12.0", - "should": "^13.2.1" - } - }, - "oas-resolver": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-1.1.1.tgz", - "integrity": "sha512-r7jWfhtW/eQ42/eqnUXMUS46jB+XoNlIOSkjN6ZQH+3tqPQHMwAqRUQTqdh+0Qw7IAipftb6zFVwyfE6kVCmGQ==", - "dev": true, - "requires": { - "js-yaml": "^3.12.0", - "node-fetch-h2": "^2.3.0", - "oas-kit-common": "^1.0.6", - "reftools": "^1.0.4", - "yargs": "^12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "oas-schema-walker": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.2.tgz", - "integrity": "sha512-Q9xqeUtc17ccP/dpUfARci4kwFFszyJAgR/wbDhrRR/73GqsY5uSmKaIK+RmBqO8J4jVYrrDPjQKvt1IcpQdGw==", - "dev": true - }, - "oas-validator": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-1.1.13.tgz", - "integrity": "sha512-sEWaUq5/b5+iOUEtnu/Ioi3bN1SwIvexSpeFdg3H0v4ASPmK1l/70vpYXfupVElFzjx4unc2odFp9oJR+L5f7w==", - "dev": true, - "requires": { - "ajv": "^5.5.2", - "better-ajv-errors": "^0.5.2", - "js-yaml": "^3.12.0", - "oas-kit-common": "^1.0.4", - "oas-linter": "^1.0.8", - "oas-resolver": "^1.0.12", - "oas-schema-walker": "^1.1.0", - "reftools": "^1.0.3", - "should": "^13.2.1" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.reduce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", - "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "ono": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz", - "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", - "dev": true, - "requires": { - "format-util": "^1.0.3" - } - }, - "optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", - "dev": true, - "requires": { - "wordwrap": "~0.0.2" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } - } - }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", - "dev": true - }, - "opts": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/opts/-/opts-1.2.6.tgz", - "integrity": "sha1-0YXAQlz9652h0YKQi2W1wCOP67M=", - "dev": true - }, - "ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-node-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", - "dev": true - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-loader": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/path-loader/-/path-loader-1.0.10.tgz", - "integrity": "sha512-CMP0v6S6z8PHeJ6NFVyVJm6WyJjIwFvyz2b0n2/4bKdS/0uZa/9sKUlYZzubrn3zuDRU0zIuEDX9DZYQ2ZI8TA==", - "dev": true, - "requires": { - "native-promise-only": "^0.8.1", - "superagent": "^3.8.3" - } - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "dev": true - }, - "path-sort": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/path-sort/-/path-sort-0.1.0.tgz", - "integrity": "sha1-ywF11Oy/paGP5nTMbXIL/hXguAU=", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "dev": true, - "requires": { - "through": "~2.3" - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "php-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-2.2.0.tgz", - "integrity": "sha1-ZzhPClkz2770C+qwqzHQuMWC/4g=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "plugin-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", - "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", - "dev": true, - "requires": { - "ansi-colors": "^1.0.1", - "arr-diff": "^4.0.0", - "arr-union": "^3.1.0", - "extend-shallow": "^3.0.2" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.1.33", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.33.tgz", - "integrity": "sha512-LTDP2uSrsc7XCb5lO7A8BI1qYxRe/8EqlRvMeEl6rsnYAqDOl8xHR+8lSAIVfrNaSAlTPTNOCgNjWcoUL3AZsw==", - "dev": true - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, - "requires": { - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "queue": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/queue/-/queue-4.5.1.tgz", - "integrity": "sha512-AMD7w5hRXcFSb8s9u38acBZ+309u6GsiibP4/0YacJeaurRshogB7v/ZcVPxP5gD5+zIw6ixRHdutiYUJfwKHw==", - "dev": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "ramda": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.20.1.tgz", - "integrity": "sha1-yB6PteeLXv8iaTSe4ENBN7THRlE=", - "dev": true - }, - "randexp": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", - "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", - "dev": true, - "requires": { - "drange": "^1.0.2", - "ret": "^0.2.0" - }, - "dependencies": { - "ret": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", - "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", - "dev": true - } - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - } - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "reftools": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.0.7.tgz", - "integrity": "sha512-J4rugWI8+trddvJxXzK0VeEW9YBfofY5SOJzmvRRiVYRzbR8RbFjtlP2eZbJlqz5GwkvO9iCJZLvkem7dGA5zg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==", - "dev": true - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "remove-bom-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5", - "is-utf8": "^0.2.1" - } - }, - "remove-bom-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", - "dev": true, - "requires": { - "remove-bom-buffer": "^3.0.0", - "safe-buffer": "^5.1.0", - "through2": "^2.0.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, - "replace-homedir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", - "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1", - "is-absolute": "^1.0.0", - "remove-trailing-separator": "^1.1.0" - } - }, - "replacestream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", - "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.3", - "object-assign": "^4.0.1", - "readable-stream": "^2.0.2" - } - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-dir": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-0.3.2.tgz", - "integrity": "sha1-wdXHXp+//eny5rM+OD209ZS1pqk=", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", - "dev": true, - "requires": { - "value-or-function": "^3.0.0" - } - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "rtlcss": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-2.4.0.tgz", - "integrity": "sha512-hdjFhZ5FCI0ABOfyXOMOhBtwPWtANLCG7rOiOcRf+yi5eDdxmDjqBruWouEnwVdzfh/TWF6NNncIEsigOCFZOA==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "findup": "^0.1.5", - "mkdirp": "^0.5.1", - "postcss": "^6.0.14", - "strip-json-comments": "^2.0.0" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-json-stringify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", - "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - } - }, - "sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", - "dev": true - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "semver-greatest-satisfied-range": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", - "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", - "dev": true, - "requires": { - "sver-compat": "^1.5.0" - } - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shelljs": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz", - "integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g=", - "dev": true - }, - "should": { - "version": "13.2.3", - "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", - "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", - "dev": true, - "requires": { - "should-equal": "^2.0.0", - "should-format": "^3.0.3", - "should-type": "^1.4.0", - "should-type-adaptors": "^1.0.1", - "should-util": "^1.0.0" - } - }, - "should-equal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", - "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", - "dev": true, - "requires": { - "should-type": "^1.4.0" - } - }, - "should-format": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", - "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", - "dev": true, - "requires": { - "should-type": "^1.3.0", - "should-type-adaptors": "^1.0.1" - } - }, - "should-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", - "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", - "dev": true - }, - "should-type-adaptors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", - "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", - "dev": true, - "requires": { - "should-type": "^1.3.0", - "should-util": "^1.0.0" - } - }, - "should-util": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", - "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", - "dev": true - }, - "showdown": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.0.tgz", - "integrity": "sha512-x7xDCRIaOlicbC57nMhGfKamu+ghwsdVkHMttyn+DelwzuHOx4OHCVL/UW/2QOLH7BxfCcCCVVUix3boKXJKXQ==", - "dev": true, - "requires": { - "yargs": "^10.0.3" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz", - "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^8.1.0" - } - }, - "yargs-parser": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", - "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", - "dev": true - }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", - "dev": true, - "requires": { - "through": "2" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "dev": true - }, - "static-eval": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", - "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", - "dev": true, - "requires": { - "escodegen": "^1.8.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stream-combiner": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", - "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", - "dev": true, - "requires": { - "duplexer": "~0.1.1", - "through": "~2.3.4" - } - }, - "stream-exhaust": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", - "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", - "dev": true - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "streamfilter": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.7.tgz", - "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-bom-buf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", - "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", - "dev": true, - "requires": { - "is-utf8": "^0.2.1" - } - }, - "strip-bom-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-3.0.0.tgz", - "integrity": "sha1-lWvMXYRDD2klapDtgjdlzYWOFZw=", - "dev": true, - "requires": { - "first-chunk-stream": "^2.0.0", - "strip-bom-buf": "^1.0.0" - } - }, - "strip-bom-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "strip-outer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", - "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.2" - } - }, - "strip-url-auth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz", - "integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=", - "dev": true - }, - "superagent": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", - "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", - "dev": true, - "requires": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.2.0", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.3.5" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "sver-compat": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", - "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", - "dev": true, - "requires": { - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, - "swagger-editor-dist": { - "version": "3.6.31", - "resolved": "https://registry.npmjs.org/swagger-editor-dist/-/swagger-editor-dist-3.6.31.tgz", - "integrity": "sha512-mX7o2zWq8Fi2wRbYLJc46dWBBGtEwSyNmn26ohfc0tw+A6B7nX/oEwxYaGtoOLyc05jxg+LQMoOWRi5edbQ/1A==", - "dev": true - }, - "swagger-methods": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/swagger-methods/-/swagger-methods-1.0.8.tgz", - "integrity": "sha512-G6baCwuHA+C5jf4FNOrosE4XlmGsdjbOjdBK4yuiDDj/ro9uR4Srj3OR84oQMT8F3qKp00tYNv0YN730oTHPZA==", - "dev": true - }, - "swagger-repo": { - "version": "2.0.0-rc.13", - "resolved": "https://registry.npmjs.org/swagger-repo/-/swagger-repo-2.0.0-rc.13.tgz", - "integrity": "sha512-Yek5wom6m2oHpV8FRYJAw1XiT0Utpb9UqWm0L76dJtO52HpGJnvub6OdKMofL06IHiuhcLL9mG9WYjsoU5aygA==", - "dev": true, - "requires": { - "body-parser": "^1.15.2", - "chalk": "^2.4.1", - "commander": "^2.9.0", - "cors": "^2.7.1", - "express": "^4.13.4", - "fs-extra": "^7.0.1", - "gh-pages": "^2.0.1", - "glob": "^7.0.0", - "js-yaml": "^3.13.1", - "json-pointer": "^0.6.0", - "jsonpath": "^1.0.2", - "livereload": "^0.8.0", - "lodash": "^4.5.0", - "mkdirp": "^0.5.1", - "node-fetch": "^2.3.0", - "oas-validator": "^1.1.13", - "require-dir": "^1.0.0", - "swagger-editor-dist": "^3.6.16", - "swagger-ui-dist": "^3.20.1", - "sway": "^2.0.6" - }, - "dependencies": { - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "require-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-1.2.0.tgz", - "integrity": "sha512-LY85DTSu+heYgDqq/mK+7zFHWkttVNRXC9NKcKGyuGLdlsfbjEPrIEYdCVrx6hqnJb+xSu3Lzaoo8VnmOhhjNA==", - "dev": true - } - } - }, - "swagger-schema-official": { - "version": "2.0.0-bab6bed", - "resolved": "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz", - "integrity": "sha1-cAcEaNbSl3ylI3suUZyn0Gouo/0=", - "dev": true - }, - "swagger-ui-dist": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.23.0.tgz", - "integrity": "sha512-DMnt69K3p8BwnKf8f8uOqsts/teZNRS4LlXAqjfa8HS2RKWWOCSiVEHkMzY3zlU4wqu/olPdF0zDEm9Ed5JZ4A==", - "dev": true - }, - "sway": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/sway/-/sway-2.0.6.tgz", - "integrity": "sha512-0HRT2WuU44XIdq+eCiMx67Bl/kiEKORP+4j+Wt89rFjoR5Dwx2hmU4PkMA6hnd48XLfS50olIac3pQGrV/wv7w==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "faker": "^4.1.0", - "js-base64": "^2.4.5", - "js-yaml": "^3.13.1", - "json-refs": "^3.0.13", - "json-schema-faker": "^0.5.0-rc16", - "lodash": "^4.17.10", - "native-promise-only": "^0.8.1", - "path-to-regexp": "^1.7.0", - "swagger-methods": "^1.0.0", - "swagger-schema-official": "2.0.0-bab6bed", - "z-schema": "^3.22.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - } - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - }, - "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "dev": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" - } - }, - "ternary-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ternary-stream/-/ternary-stream-2.0.1.tgz", - "integrity": "sha1-Bk5Im0tb9gumpre8fy9cJ07Pgmk=", - "dev": true, - "requires": { - "duplexify": "^3.5.0", - "fork-stream": "^0.0.4", - "merge-stream": "^1.0.0", - "through2": "^2.0.1" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "textextensions": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz", - "integrity": "sha1-ZUhjk+4fK7A5pgy7oFsLaL2VAdI=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "through2-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", - "dev": true, - "requires": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "timers-ext": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", - "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", - "dev": true, - "requires": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - } - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "to-through": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", - "dev": true, - "requires": { - "through2": "^2.0.3" - } - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.2" - } - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "dev": true, - "requires": { - "glob": "^7.1.2" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", - "dev": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", - "dev": true - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true - }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true - }, - "undertaker": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", - "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "bach": "^1.0.0", - "collection-map": "^1.0.0", - "es6-weak-map": "^2.0.1", - "last-run": "^1.1.0", - "object.defaults": "^1.0.0", - "object.reduce": "^1.0.0", - "undertaker-registry": "^1.0.0" - } - }, - "undertaker-registry": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", - "dev": true, - "requires": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "v8flags": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", - "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validator": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", - "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==", - "dev": true - }, - "value-or-function": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", - "dev": true - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - }, - "vinyl-fs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", - "dev": true, - "requires": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" - } - }, - "vinyl-sourcemap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", - "dev": true, - "requires": { - "append-buffer": "^1.0.2", - "convert-source-map": "^1.5.0", - "graceful-fs": "^4.1.6", - "normalize-path": "^2.1.1", - "now-and-later": "^2.0.0", - "remove-bom-buffer": "^3.0.0", - "vinyl": "^2.0.0" - } - }, - "vinyl-sourcemaps-apply": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", - "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", - "dev": true, - "requires": { - "source-map": "^0.5.1" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wp-pot": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/wp-pot/-/wp-pot-1.7.1.tgz", - "integrity": "sha512-joAZlF+UnluusrgDfFtQDkpxaqmaAsB/82etbVvmcLKehLIrRT5lJfsLiY4ejpceddcazxnnMYy1tstIsZtHYg==", - "dev": true, - "requires": { - "matched": "^3.0.1", - "path-sort": "^0.1.0", - "php-parser": "^3.0.0-prerelease.8" - }, - "dependencies": { - "php-parser": { - "version": "3.0.0-prerelease.8", - "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.0.0-prerelease.8.tgz", - "integrity": "sha512-sVMPsnPd3q7kf1vs0VUROo71Klcs6s7Ho5TSMcBcI8Qg5VuVMaM5far36E4qaYTH8SW+2Tquv5RuU7e8+jfjIw==", - "dev": true - } - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "dev": true, - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "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": "^5.0.0" - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3" - } - }, - "z-schema": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.25.1.tgz", - "integrity": "sha512-7tDlwhrBG+oYFdXNOjILSurpfQyuVgkRe3hB2q8TEssamDHB7BbLWYkYO98nTn0FibfdFroFKDjndbgufAgS/Q==", - "dev": true, - "requires": { - "commander": "^2.7.1", - "core-js": "^2.5.7", - "lodash.get": "^4.0.0", - "lodash.isequal": "^4.0.0", - "validator": "^10.0.0" - }, - "dependencies": { - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, - "optional": true - } - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 8fd1062c..00000000 --- a/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "lifterlms-rest", - "version": "1.0.0-beta.1", - "description": "REST API feature plugin for the LifterLMS Core.", - "author": "LifterLMS", - "homepage": "https://lifterlms.com/", - "main": "gulpfile.js", - "repository": { - "type": "git", - "url": "https://github.com/gocodebox/lifterlms-rest.git" - }, - "license": "GPL-3.0", - "bugs": { - "url": "https://github.com/gocodebox/lifterlms-rest/issues" - }, - "devDependencies": { - "gulp": "^4.0.0", - "lifterlms-lib-tasks": "^3.5.1", - "require-dir": "^0.3.2", - "swagger-repo": "^2.0.0-rc.13" - }, - "scripts": { - "start": "swagger-repo serve -p 8888", - "build": "swagger-repo build -o web_deploy", - "test": "swagger-repo validate", - "gh-pages": "swagger-repo gh-pages" - } -} diff --git a/phpcs.xml b/phpcs.xml deleted file mode 100644 index 94f1f3b0..00000000 --- a/phpcs.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - LifterLMS REST API rules for PHP_CodeSniffer - - . - - - - - - - - - - diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index 08a5d239..00000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - tests/unit-tests - - ./tests/unit-tests/class-llms-rest-test-webhook-delivery.php - - - - - - . - - ./tests/ - ./tmp/ - ./dist/ - ./node_modules/ - ./vendor/ - ./**/index.php - - - - - diff --git a/spec/README.md b/spec/README.md deleted file mode 100644 index cb92eacf..00000000 --- a/spec/README.md +++ /dev/null @@ -1,24 +0,0 @@ -## Global headers (only for OpenAPI 2) - -When using OpenAPI 2 you can minimize headers duplications by using `headers` global object (similar to `definitions`, `responses`). -During build process all references to global `headers` will be inlined and `headers` will be removed from the resulting spec so spec will be valid (global `headers` are not allowed by OpenAPI 2 spec): - -Example: -```yaml -... -headers: - Rate-Limit-Limit: - description: The number of allowed requests in the current period - type: integer -... -paths: - /api-keys: - get: - summary: Retrieve a list of api keys - responses: - 200: - description: A list of api keys was retrieved successfully - headers: - Rate-Limit-Limit: - $ref: "#/headers/Rate-Limit-Limit" -``` diff --git a/spec/code_samples/cURL/access-plans/get.sh b/spec/code_samples/cURL/access-plans/get.sh deleted file mode 100644 index 9c3741b8..00000000 --- a/spec/code_samples/cURL/access-plans/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl https://example.tld/wp-json/llms/v1/access-plans \ - -G diff --git a/spec/code_samples/cURL/access-plans/post.sh b/spec/code_samples/cURL/access-plans/post.sh deleted file mode 100644 index 0a9e1e99..00000000 --- a/spec/code_samples/cURL/access-plans/post.sh +++ /dev/null @@ -1,4 +0,0 @@ -curl https://example.tld/wp-json/llms/v1/access-plans \ - -d price=199.97 \ - -d title="Lifetime Access" - -d post_id=123 diff --git a/spec/code_samples/cURL/access-plans@{id}/delete.sh b/spec/code_samples/cURL/access-plans@{id}/delete.sh deleted file mode 100644 index b238dab5..00000000 --- a/spec/code_samples/cURL/access-plans@{id}/delete.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl https://example.tld/wp-json/llms/v1/access-plans/1234 \ - -X DELETE diff --git a/spec/code_samples/cURL/access-plans@{id}/get.sh b/spec/code_samples/cURL/access-plans@{id}/get.sh deleted file mode 100644 index 06d64c40..00000000 --- a/spec/code_samples/cURL/access-plans@{id}/get.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl https://example.tld/wp-json/llms/v1/access-plans/1234 \ - -G diff --git a/spec/code_samples/cURL/access-plans@{id}/post.sh b/spec/code_samples/cURL/access-plans@{id}/post.sh deleted file mode 100644 index 95773740..00000000 --- a/spec/code_samples/cURL/access-plans@{id}/post.sh +++ /dev/null @@ -1,2 +0,0 @@ -curl https://example.tld/wp-json/llms/v1/access-plans/1234 \ - -d price=25.00 diff --git a/spec/components/README.md b/spec/components/README.md deleted file mode 100644 index 7a2c6f8d..00000000 --- a/spec/components/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Reusable components -=========== - -* You can create the following folders here: - - `schemas` - reusable [Schema Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject) - - `responses` - reusable [Response Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#responseObject) - - `parameters` - reusable [Parameter Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#parameterObject) - - `examples` - reusable [Example Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#exampleObject) - - `headers` - reusable [Header Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#headerObject) - - `requestBodies` - reusable [Request Body Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#requestBodyObject) - - `links` - reusable [Link Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#linkObject) - - `callbacks` - reusable [Callback Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#callbackObject) - - `securitySchemes` - reusable [Security Scheme Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#securitySchemeObject) -* Filename of files inside the folders represent component name, i.e. `Customer.yaml` diff --git a/spec/components/headers/PaginationTotalPages.yaml b/spec/components/headers/PaginationTotalPages.yaml deleted file mode 100644 index ff6de2ce..00000000 --- a/spec/components/headers/PaginationTotalPages.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: Total number of pages available in the collection. -schema: - type: integer - example: 28 diff --git a/spec/components/headers/PaginationTotalResults.yaml b/spec/components/headers/PaginationTotalResults.yaml deleted file mode 100644 index e55c4368..00000000 --- a/spec/components/headers/PaginationTotalResults.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: Total number of results found in the collection. -schema: - type: integer - example: 275 diff --git a/spec/components/parameters/Context.yaml b/spec/components/parameters/Context.yaml deleted file mode 100644 index 2ba7b73b..00000000 --- a/spec/components/parameters/Context.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: context -in: query -description: Specify the scope under which the request is made. `edit` should be used when requesting content to be modified; `view` should be used when requesting content to be displayed. -required: false -schema: - type: string - enum: - - view - - edit - default: view diff --git a/spec/components/parameters/EnrollmentStatus.yaml b/spec/components/parameters/EnrollmentStatus.yaml deleted file mode 100644 index c5dbf064..00000000 --- a/spec/components/parameters/EnrollmentStatus.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: enrollment_status -in: query -description: Limit results by enrollment status. -required: false -schema: - $ref: '#/components/schemas/EnrollmentStatus' diff --git a/spec/components/parameters/Exclude.yaml b/spec/components/parameters/Exclude.yaml deleted file mode 100644 index b93b2720..00000000 --- a/spec/components/parameters/Exclude.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: exclude -in: query -description: Exclude a list of `id`s from results. Accepts a single `id` or a comma separated list of `id`s. -schema: - type: string - example: [10,11,12] diff --git a/spec/components/parameters/Include.yaml b/spec/components/parameters/Include.yaml deleted file mode 100644 index 3804ae70..00000000 --- a/spec/components/parameters/Include.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: include -in: query -description: Limit results to a list of `id`s. Accepts a single `id` or a comma separated list of `id`s. -schema: - type: string - example: [1,2,3] diff --git a/spec/components/parameters/Order.yaml b/spec/components/parameters/Order.yaml deleted file mode 100644 index 106d770e..00000000 --- a/spec/components/parameters/Order.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: order -in: query -description: Specifcy the sort order for a collection of results. -required: false -schema: - type: string - enum: - - asc - - desc - default: asc diff --git a/spec/components/parameters/Page.yaml b/spec/components/parameters/Page.yaml deleted file mode 100644 index ebdd296d..00000000 --- a/spec/components/parameters/Page.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: page -in: query -description: Specify the page number for a paginated collection. -required: false -schema: - type: integer - minimum: 1 - default: 1 diff --git a/spec/components/parameters/PerPage.yaml b/spec/components/parameters/PerPage.yaml deleted file mode 100644 index 3719e512..00000000 --- a/spec/components/parameters/PerPage.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: per_page -in: query -description: Specify the number of results per paginated collection page. -required: false -schema: - type: integer - minimum: 1 - default: 10 diff --git a/spec/components/parameters/PostPassword.yaml b/spec/components/parameters/PostPassword.yaml deleted file mode 100644 index 39fd62ad..00000000 --- a/spec/components/parameters/PostPassword.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: password -in: query -description: Post password. Required if the post is password protected. -required: false -schema: - type: string - example: p4$sW0rd diff --git a/spec/components/parameters/PostType.yaml b/spec/components/parameters/PostType.yaml deleted file mode 100644 index e8f7e068..00000000 --- a/spec/components/parameters/PostType.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: post_type -in: query -description: Filter results to those of a specific `post_type`. -required: false -schema: - $ref: '#/components/schemas/PostType' diff --git a/spec/components/responses/Error400.yaml b/spec/components/responses/Error400.yaml deleted file mode 100644 index ab711c5d..00000000 --- a/spec/components/responses/Error400.yaml +++ /dev/null @@ -1,6 +0,0 @@ -x-summary: Bad request. -description: Invalid or malformed request syntax. -content: - application/json: - schema: - $ref: '#/components/schemas/Error400' diff --git a/spec/components/responses/Error401.yaml b/spec/components/responses/Error401.yaml deleted file mode 100644 index 8ed29fba..00000000 --- a/spec/components/responses/Error401.yaml +++ /dev/null @@ -1,6 +0,0 @@ -x-summary: Unauthorized. -description: Invalid API Credentials. -content: - application/json: - schema: - $ref: '#/components/schemas/Error401' diff --git a/spec/components/responses/Error403.yaml b/spec/components/responses/Error403.yaml deleted file mode 100644 index 62facc84..00000000 --- a/spec/components/responses/Error403.yaml +++ /dev/null @@ -1,6 +0,0 @@ -x-summary: Forbidden. -description: The client does not have access to perform the requested action. -content: - application/json: - schema: - $ref: '#/components/schemas/Error403' diff --git a/spec/components/responses/Error404.yaml b/spec/components/responses/Error404.yaml deleted file mode 100644 index 3e9d4822..00000000 --- a/spec/components/responses/Error404.yaml +++ /dev/null @@ -1,6 +0,0 @@ -x-summary: Not Found. -description: The requested resource could not be located. -content: - application/json: - schema: - $ref: '#/components/schemas/Error404' diff --git a/spec/components/schemas/APIKey.yaml b/spec/components/schemas/APIKey.yaml deleted file mode 100644 index 8cb0f51f..00000000 --- a/spec/components/schemas/APIKey.yaml +++ /dev/null @@ -1,65 +0,0 @@ -type: object -properties: - id: - allOf: - - description: Unique API Key Identifier. - - $ref: '#/components/schemas/ResourceId' - user_id: - description: The WordPress User ID of the API Key's owner. - type: integer - minimum: 1 - example: 456 - description: - description: A friendly, human-readable name description of the key. - type: string - example: My API Key - permissions: - description: Determines the key's permissions and capabilities. - type: string - enum: - - read - - write - - read_write - truncated_key: - description: The last 7 characters of the Consumer Key. - type: string - example: 61913f3 - readOnly: true - last_access: - description: 'The date the key was last used. Format: `Y-m-d H:i:s`' - type: string - example: '2019-05-21 19:22:05' - readOnly: true - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the API key. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/api-keys/123 - collection: - description: REST URI to the API key collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/api-keys - user: - description: REST URI to the API key's owner. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/wp/v2/users/456 - diff --git a/spec/components/schemas/AccessPlan.yaml b/spec/components/schemas/AccessPlan.yaml deleted file mode 100644 index 883a00c0..00000000 --- a/spec/components/schemas/AccessPlan.yaml +++ /dev/null @@ -1,186 +0,0 @@ -allOf: - - type: object - properties: - id: - readOnly: true - description: Unique Access Plan Identifier. The WordPress Post `ID`. - price: - description: Access plan price. - type: number - format: float - minimum: 0 - example: 199.97 - sku: - description: External identifier. - type: string - example: LIFETIME-999-001 - frequency: - description: >- - Billing frequency.
- `0` denotes a one-time payment.
- `>= 1` denotes a recurring plan. - type: integer - minimum: 0 - maximum: 6 - default: 0 - length: - description: >- - For recurring plans only.
- Determines the number of intervals a plan should run for.
- `0` denotes the plan should run until cancelled. - type: integer - minimum: 0 - default: 0 - period: - description: >- - For recurring plans only.
- Determines the interval of recurring payments. - type: string - enum: - - year - - month - - week - - day - default: year - enroll_text: - description: Text of the "Purchase" button - type: string - default: Buy Now - sale_enabled: - description: Mark the plan as "On Sale" allowing for temporary price adjustments. - type: boolean - default: false - sale_price: - description: Sale price. - type: number - format: float - minimum: 0 - example: 1.00 - sale_date_start: - description: >- - Used to automatically start a scheduled sale. If empty, the plan is on sale immediately.
- Only appies when `sale_pricing` is `true`. - Format: `Y-m-d H:i:s`. - type: string - example: '2019-01-23 00:00:00' - sale_date_end: - description: >- - Used to automatically end a scheduled sale. If empty, the plan remains on sale indefinitely.
- Only appies when `sale_pricing` is `true`. - Format: `Y-m-d H:i:s`. - type: string - example: '2019-03-23 23:59:59' - availability_restrictions: - description: Restrict usage of this access plan to students enrolled in at least one of the specified memberships. - type: array - minimum: 1 - example: [ 123, 456, 789 ] - items: - type: integer - access_expiration: - description: >- - Access expiration type.
- `lifetime` provides access until cancelled or until a recurring payment fails.
- `limited-period` provides access for a limited period as specified by `access_length` and `access_period` - `limited-date` provides access until the date specified by `access_expires_date` - type: string - enum: - - lifetime - - limited-period - - limited-date - default: lifetime - access_expires: - description: >- - Date when access expires.
- Only applicable when $access_expiration is `limited-date`. - Format: `Y-m-d H:i:s`. - type: string - access_length: - description: >- - Determine the length of access from time of purchase.
- Only applicable when `access_expiration` is `limited-period`. - type: integer - minimum: 1 - default: 1 - access_period: - description: >- - Determine the length of access from time of purchase.
- Only applicable when `access_expiration` is `limited-period`. - type: string - enum: - - year - - month - - week - - day - default: year - trial_enabled: - description: Enable a trial period for a recurring access plan. - type: boolean - default: false - trial_length: - description: >- - Determines the length of trial access.
- Only applicaable when `trial_enabled` is `true`. - type: integer - minimum: 1 - default: 1 - trial_period: - description: >- - Determines the length of trial access.
- Only applicaable when `trial_enabled` is `true`. - type: string - enum: - - year - - month - - week - - day - default: week - trial_price: - description: >- - Determines the price of the trial period.
- Only applicaable when `trial_enabled` is `true`. - type: number - format: float - minimum: 0 - default: 0 - example: 1.99 - post_id: - description: Determines the course or membership which can be accessed through the plan. - type: integer - minimum: 1 - example: 789 - redirect_type: - description: >- - Determines the redirction behavior of the user's browser upon successful checkout or registration through the plan.
- `self`: Redirect to the permalink of the specified `post_id`. - `page`: Redirect to the permalink of the WordPress page specified by `redirect_page_id`. - `url`: Redirect to the URL specified by `redirect_url`. - type: string - enum: - - self - - page - - url - default: self - redirect_page: - description: WordPress page ID to use for checkout success redirection.
Applicable only when `redirect_type` is `page`. - type: integer - minimum: 1 - redirect_url: - description: URL to use for checkout success redirection.
Applicable only when `redirect_type` is `url`. - type: string - example: https://example.tld/my/redirect - redirect_forced: - description: >- - Use this plans's redirect settings when purchasing a Membership this plan is restricted to.
- Applicable only when `availability_restrictions` exist for the plan. - type: boolean - default: false - visibility: - description: Access plan visibility. - type: string - enum: - - visible - - hidden - - featured - default: visible - - $ref: '#/components/schemas/Post' diff --git a/spec/components/schemas/AccessPlanRequest.yaml b/spec/components/schemas/AccessPlanRequest.yaml deleted file mode 100644 index c79ea76a..00000000 --- a/spec/components/schemas/AccessPlanRequest.yaml +++ /dev/null @@ -1,12 +0,0 @@ -allOf: - - $ref: '#/components/schemas/AccessPlan' - - type: object - properties: - title: - type: string - description: Access plan name. - example: Liftetime Access - content: - type: string - description: Access plan short description. - example: \n\n diff --git a/spec/components/schemas/AccessPlanResponse.yaml b/spec/components/schemas/AccessPlanResponse.yaml deleted file mode 100644 index 1bf89f90..00000000 --- a/spec/components/schemas/AccessPlanResponse.yaml +++ /dev/null @@ -1,71 +0,0 @@ -required: - - price -allOf: - - $ref: '#/components/schemas/AccessPlan' - - type: object - properties: - title: - description: Access plan name. - type: object - properties: - rendered: - type: string - description: Rendered title. - example: Liftetime Access - raw: - type: string - description: Raw title. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example: Liftetime Access - content: - description: Access plan short description. - type: object - properties: - rendered: - type: string - description: Rendered description. - example: \n\n - raw: - type: string - description: Raw description. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example: \n\n - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the access plan. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/access-plans/123 - collection: - description: REST URI to the access plan collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/access-plans - post: - description: REST URI to the access plan's related course or membership. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses/789 - restrictions: - description: REST URIs to the memberships required to use the access plan. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/memberships?include=123,456,789 diff --git a/spec/components/schemas/Address.yaml b/spec/components/schemas/Address.yaml deleted file mode 100644 index ba794bfe..00000000 --- a/spec/components/schemas/Address.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -properties: - address_1: - description: Address line 1. - type: string - example: 1234 Somewhere Place - address_2: - description: Address line 2. - type: string - example: Suite ABC - city: - description: City name. - type: string - example: Anywhere - state: - description: 'ISO code or state, province, or district name.' - type: string - example: CA - postcode: - description: Postal code. - type: string - example: 12345-678 - country: - description: ISO country code. - type: string - example: US diff --git a/spec/components/schemas/Course.yaml b/spec/components/schemas/Course.yaml deleted file mode 100644 index 26e5923a..00000000 --- a/spec/components/schemas/Course.yaml +++ /dev/null @@ -1,104 +0,0 @@ -allOf: - - type: object - properties: - id: - readOnly: true - description: Unique Course Identifier. The WordPress Post `ID`. - - $ref: '#/components/schemas/PostPublic' - - type: object - properties: - permalink: - example: https://example.com/course/getting-started-with-lifterlms - post_type: - default: course - type: string - catalog_visibility: - description: Visibility of the course in catalogs and search results. - type: string - categories: - description: List of course categories. - type: array - items: - type: integer - tags: - description: List of course tags. - type: array - items: - type: integer - difficulties: - description: List of course difficulties. - type: array - default: [] - example: [ 7 ] - items: - type: integer - tracks: - description: List of course tracks. - type: array - default: [] - example: [ 8, 9 ] - items: - type: integer - audio_embed: - description: URL to an oEmbed enable audio URL. - type: string - example: https://open.spotify.com/track/trackid - video_embed: - description: URL to an oEmbed enable video URL. - type: string - example: https://www.youtube.com/watch?v=videoid - capacity_enabled: - description: Determines if an enrollment capacity limit is enabled. - type: boolean - default: false - capacity_limit: - description: Number of students who can be enrolled in the course before enrollment closes. - minimum: 0 - type: integer - example: 25 - prerequisite: - description: Course ID of the prerequisite course. - type: integer - example: 456 - prerequisite_track: - description: Term ID of a the prerequisite track. - type: integer - example: 789 - access_opens_date: - description: >- - Date when the course opens, allowing enrolled students to begin to view and interact with the restricted course content.
- If blank the course is open until after the `access_closes_date` has passed.
- Does not affect course enrollment, see `enrollment_opens_date` to control the course enrollment start date.
- Format: `Y-m-d H:i:s`. - type: string - example: '2019-05-20 17:22:05' - access_closes_date: - description: >- - Date when the course closes. After this date enrolled students may no longer view and interact with the restricted course content.
- If blank the course is open indefinitely after the the `access_opens_date` has passed.
- Does not affect course enrollment, see `enrollment_opens_date` to control the course enrollment close date.
- Format: `Y-m-d H:i:s`. - type: string - example: '2019-06-05 17:22:05' - enrollment_opens_date: - description: >- - Date when the course enrollment opens.
- If blank course enrollment is open until after the `enrollment_closes_date` has passed.
- Does not affect course content access, see `access_opens_date` to control course access start date.
- Format: `Y-m-d H:i:s`. - type: string - example: '2019-05-15 12:15:00' - enrollment_closes_date: - description: >- - Date when the course enrollment closes.
- If blank course enrollment is open indefinitely after the the `enrollment_opens_date` has passed.
- Does not affect course content access, see `access_opens_date` to control course access close date.
- Format: `Y-m-d H:i:s`. - type: string - example: '2019-10-01 23:59:59' - video_tile: - description: When `true` the `video_embed` will be used on the course tiles (on the catalog, for example) instead of the featured image. - type: boolean - default: false - - - $ref: '#/components/schemas/SharedCourseMembership' diff --git a/spec/components/schemas/CourseRequest.yaml b/spec/components/schemas/CourseRequest.yaml deleted file mode 100644 index 6c9a01ed..00000000 --- a/spec/components/schemas/CourseRequest.yaml +++ /dev/null @@ -1,33 +0,0 @@ -allOf: - - $ref: '#/components/schemas/PostContentRequest' - - type: object - properties: - access_opens_message: - description: Message displayed to enrolled students when the course is accessed before the `access_opens_date` has passed. - type: string - default: This course opens on [lifterlms_course_info key="start_date"]. - access_closes_message: - description: Message displayed to enrolled students when the course is accessed after the `access_closes_date` has passed. - type: string - default: This course closed on [lifterlms_course_info key="end_date"]. - enrollment_opens_message: - description: Message displayed to visitors when attempting to enroll into a course before the `enrollment_opens_date` has passed. - type: string - default: Enrollment in this course opens on [lifterlms_course_info key="enrollment_start_date"]. - enrollment_closes_message: - description: Message displayed to visitors when attempting to enroll into a course after the `enrollment_closes_date` has passed. - type: string - default: Enrollment in this course closed on [lifterlms_course_info key="enrollment_end_date"]. - capacity_message: - description: Message displayed when enrollment capacity has been reached. - type: string - default: Enrollment has closed because the maximum number of allowed students has been reached. - length: - description: User defined course length. - type: string - example: 7 days - restricted_message: - description: Message displayed when non-enrolled visitors try to access restricted course content (lessons, quizzes, etc..) directly. - type: string - default: You must enroll in this course to access course content. - - $ref: '#/components/schemas/Course' diff --git a/spec/components/schemas/CourseResponse.yaml b/spec/components/schemas/CourseResponse.yaml deleted file mode 100644 index ab4097a7..00000000 --- a/spec/components/schemas/CourseResponse.yaml +++ /dev/null @@ -1,216 +0,0 @@ -allOf: - - $ref: '#/components/schemas/PostContentResponse' - - type: object - properties: - access_opens_message: - description: Message displayed to enrolled students when the course is accessed before the `access_opens_date` has passed. - type: object - properties: - rendered: - description: Rendered message content. - type: string - default: This course opens on January, 28, 2019. - raw: - description: Raw message content. - type: string - default: This course opens on [lifterlms_course_info key="start_date"]. - access_closes_message: - description: Message displayed to enrolled students when the course is accessed after the `access_closes_date` has passed. - type: object - properties: - rendered: - description: Rendered message content. - type: string - default: This course closed on March 5, 2018. - raw: - description: Raw message content. - type: string - default: This course closed on [lifterlms_course_info key="end_date"]. - enrollment_opens_message: - description: Message displayed to visitors when attempting to enroll into a course before the `enrollment_opens_date` has passed. - type: object - properties: - rendered: - description: Rendered message content. - type: string - default: Enrollment in this course opens on opens on January, 28, 2019. - raw: - description: Raw message content. - type: string - default: Enrollment in this course opens on [lifterlms_course_info key="enrollment_start_date"]. - enrollment_closes_message: - description: Message displayed to visitors when attempting to enroll into a course after the `enrollment_closes_date` has passed. - type: object - properties: - rendered: - description: Rendered message content. - type: string - default: Enrollment in this course closed on March 5, 2018. - raw: - description: Raw message content. - type: string - default: Enrollment in this course closed on [lifterlms_course_info key="enrollment_end_date"]. - capacity_message: - description: Message displayed when enrollment capacity has been reached. - type: object - properties: - rendered: - description: Rendered message content. - type: string - example: Enrollment has closed because the maximum number of allowed students has been reached. - raw: - description: Raw message content. - type: string - example: Enrollment has closed because the maximum number of allowed students has been reached. - length: - description: User defined course length. - type: object - properties: - rendered: - description: Rendered length description. - type: string - example: 7 days - raw: - description: Raw length description. - type: string - example: 7 days - restricted_message: - description: Message displayed when non-enrolled visitors try to access restricted course content (lessons, quizzes, etc..) directly. - type: object - properties: - rendered: - description: Rendered message content. - type: string - default: You must enroll in this course to access course content. - raw: - description: Raw message content. - type: string - default: You must enroll in this course to access course content. - - $ref: '#/components/schemas/Course' - - type: object - properties: - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the course. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses/1234 - collection: - description: REST URI to the course collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses - access_plans: - description: REST URI to the collection of access plans for the course. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/access-plans?post_id=1234 - content: - description: REST URI to the course's content collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses/1234/content - enrollments: - description: REST URI to the collection of the courses's enrollments. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses/1234/enrollments - instructors: - description: REST URI to the collection of the course's instructors. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/instructors?post=1234 - prerequisites: - description: REST URIs to course prerequisite resources. - type: array - example: [ - { - "type": "course", - "href": "/wp-json/llms/v1/courses/456" - }, - { - "type": "track", - "href": "/wp-json/wp/v2/course_track/789" - } - ] - items: - type: object - properties: - type: - type: string - href: - type: string - students: - description: REST URI to the collection of the course's enrolled students. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students?enrolled_in=1234 - wp:featured_media: - description: REST URI to the WordPress attachement image. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/wp/v2/media/987 - wp:term: - description: Collection of REST URIs to the course's taxonomy term information. - type: array - example: [ - { - "taxonomy": "course_cat", - "href": "/wp-json/wp-v2/course_cat?post=123" - }, - { - "taxonomy": "course_tag", - "href": "/wp-json/wp-v2/course_tag?post=123" - }, - { - "taxonomy": "course_difficulty", - "href": "/wp-json/wp-v2/course_difficulty?post=123" - }, - { - "taxonomy": "course_track", - "href": "/wp-json/wp-v2/course_track?post=123" - } - ] - items: - type: object - properties: - taxonomy: - type: string - href: - type: string diff --git a/spec/components/schemas/Enrollment.yaml b/spec/components/schemas/Enrollment.yaml deleted file mode 100644 index b0082abb..00000000 --- a/spec/components/schemas/Enrollment.yaml +++ /dev/null @@ -1,72 +0,0 @@ -type: object -properties: - student_id: - description: The ID of the student. - type: integer - minimum: 1 - example: 123 - readOnly: true - post_id: - description: The ID of the course/membership. - type: integer - minimum: 1 - example: 456 - readOnly: true - date_created: - description: 'The enrollment creation date. Format: `Y-m-d H:i:s`' - type: string - example: '2019-05-21 14:22:05' - date_updated: - description: 'The date of the last enrollment update. Format: `Y-m-d H:i:s`' - type: string - example: '2019-05-21 19:22:05' - readOnly: true - status: - $ref: '#/components/schemas/EnrollmentStatus' - _links: - description: A map of links to other related API resources. - readOnly: true - type: object - properties: - self: - description: REST URI to the enrollment. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/123/enrollments/456 - collection: - description: REST URI to the enrollments collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/123/enrollments - post: - description: Rest URI to the post resource. - type: array - items: - type: object - properties: - type: - type: string - enum: - - course - - membership - example: course - href: - type: string - example: /wp-json/llms/v1/courses/456 - student: - description: Rest URI to the student resource. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/123 diff --git a/spec/components/schemas/EnrollmentStatus.yaml b/spec/components/schemas/EnrollmentStatus.yaml deleted file mode 100644 index b15505f4..00000000 --- a/spec/components/schemas/EnrollmentStatus.yaml +++ /dev/null @@ -1,6 +0,0 @@ -description: The status of the enrollment. -type: string -enum: - - enrolled - - expired - - cancelled diff --git a/spec/components/schemas/Error.yaml b/spec/components/schemas/Error.yaml deleted file mode 100644 index e2ed46d3..00000000 --- a/spec/components/schemas/Error.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -properties: - code: - description: The API error code. - message: - description: The API error message. - data: - description: Additional response data. - type: object - properties: - status: - minimum: 100 - maximum: 600 - description: The HTTP status code. diff --git a/spec/components/schemas/Error400.yaml b/spec/components/schemas/Error400.yaml deleted file mode 100644 index 1ccf8eb4..00000000 --- a/spec/components/schemas/Error400.yaml +++ /dev/null @@ -1,14 +0,0 @@ -allOf: - - $ref: '#/components/schemas/Error' - - properties: - code: - default: llms_rest_bad_request - type: string - message: - default: Invalid or malformed request syntax. - type: string - data: - properties: - status: - default: 400 - type: integer diff --git a/spec/components/schemas/Error401.yaml b/spec/components/schemas/Error401.yaml deleted file mode 100644 index cc687914..00000000 --- a/spec/components/schemas/Error401.yaml +++ /dev/null @@ -1,14 +0,0 @@ -allOf: - - $ref: '#/components/schemas/Error' - - properties: - code: - default: llms_rest_unauthorized_request - type: string - message: - default: The API credentials were invalid. - type: string - data: - properties: - status: - default: 401 - type: integer diff --git a/spec/components/schemas/Error403.yaml b/spec/components/schemas/Error403.yaml deleted file mode 100644 index d2cfcb98..00000000 --- a/spec/components/schemas/Error403.yaml +++ /dev/null @@ -1,14 +0,0 @@ -allOf: - - $ref: '#/components/schemas/Error' - - properties: - code: - default: llms_rest_forbidden_request - type: string - message: - default: You are not authorized to perform this request. - type: string - data: - properties: - status: - default: 403 - type: integer diff --git a/spec/components/schemas/Error404.yaml b/spec/components/schemas/Error404.yaml deleted file mode 100644 index 257d4644..00000000 --- a/spec/components/schemas/Error404.yaml +++ /dev/null @@ -1,14 +0,0 @@ -allOf: - - $ref: '#/components/schemas/Error' - - properties: - code: - default: llms_rest_not_found - type: string - message: - default: The requested resource could not be found. - type: string - data: - properties: - status: - default: 404 - type: integer diff --git a/spec/components/schemas/Instructor.yaml b/spec/components/schemas/Instructor.yaml deleted file mode 100644 index 19cfe9d2..00000000 --- a/spec/components/schemas/Instructor.yaml +++ /dev/null @@ -1,52 +0,0 @@ -allOf: - - type: object - properties: - id: - description: Unique Instructor Identifer. The WordPress User `ID`. - readOnly: true - - $ref: '#/components/schemas/User' - - type: object - properties: - roles: - description: The user's WordPress user role. - type: array - default: [ instructor ] - items: - type: string - enum: - - administrator - - lms_manager - - instructor - - instructors_assistant - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the instructor. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/instructors/1234 - collection: - description: REST URI to the instructor collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/instructors - content: - description: REST URI to a collection of the instructor's content. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/instructors/1234/contents diff --git a/spec/components/schemas/Lesson.yaml b/spec/components/schemas/Lesson.yaml deleted file mode 100644 index ffec7664..00000000 --- a/spec/components/schemas/Lesson.yaml +++ /dev/null @@ -1,137 +0,0 @@ -allOf: - - type: object - properties: - id: - description: Unique lesson identifier. The WordPress Post `ID`. - readOnly: true - - $ref: '#/components/schemas/PostPublic' - - type: object - properties: - id: - readOnly: true - example: 789 - permalink: - example: https://example.com/lesson/getting-started-with-lifterlms - post_type: - default: lesson - type: string - audio_embed: - description: URL to an oEmbed enable audio URL. - type: string - example: https://open.spotify.com/track/trackid - video_embed: - description: URL to an oEmbed enable video URL. - type: string - example: https://www.youtube.com/watch?v=videoid - prerequisite: - description: Lesson ID of the prerequisite lesson. - type: integer - example: 321 - public: - description: Denotes a lesson that's publicly accessible regardless of course enrollment. - type: boolean - default: false - course_id: - description: WordPress post ID of the lesson's parent course. - type: integer - minimum: 1 - example: 1234 - readOnly: true - parent_id: - description: WordPress post ID of the parent item.
Must be a Section ID. `0` indicates an "orphaned" lesson which can be edited and viewed by instructors and admins but cannot be read by students. - type: integer - minimum: 0 - example: 987 - points: - description: Determines the weight of the lesson when grading the course. - type: integer - minimum: 0 - default: 1 - order: - description: Order of the lesson within its immediate parent. - type: integer - default: 1 - minimum: 1 - drip_method: - description: | - Determine the method with which to make the lesson content available. - - - `none`: Drip is disabled; the lesson is immediately available. - - `date`: Lesson is made available at a specific date and time. - - `enrollment`: Lesson is made available a specific number of days after enrollment into the course. - - `start`: Lesson is made available a specific number of days after the course's start date. Only available on courses with a `access_opens_date`. - - `prerequisite`: Lesson is made available a specific number of days after the `prerequisite` lesson is completed. - type: string - enum: - - none - - date - - enrollment - - start - - prerequisite - default: none - drip_days: - description: Number of days to wait before allowing access to the lesson. Applicable only when `drip_method` is `enrollment`, `start`, or `prerequisite`. - type: integer - minimum: 1 - default: 1 - drip_date: - description: 'The date and time when the lesson becomes available. Applicable only when `drip_method` is `date`. Format: `Y-m-d H:i:s`.' - type: string - nullable: true - example: '2019-12-12 23:23:59' - quiz: - description: Associate a quiz with this lesson. - type: object - properties: - enabled: - description: Determines if a quiz is enabled for the lesson. - type: boolean - default: false - example: true - id: - description: The post ID of the associated quiz. - type: integer - minimum: 0 - default: 0 - example: 432 - progression: - description: | - Determines lesson progression requirements related to the quiz. - - - `complete`: The quiz must be completed (with any grade) to progress the lesson. - - `pass`: A passing grade must be earned to progress the lesson. - type: string - enum: - - complete - - pass - default: complete - assignment: - description: | - Associate an assignment with this lesson. - - _While assignment functionality is included with the LifterLMS Core REST API, the assignments themselves are implemented by the LifterLMS Assignments add-on._ - type: object - properties: - enabled: - description: Determines if an assignment is enabled for the lesson. - type: boolean - default: false - example: true - id: - description: The post ID of the associated assingment. - type: integer - minimum: 0 - default: 0 - example: 876 - progression: - description: | - Determines lesson progression requirements related to the assignment. - - - `complete`: The assignment must be completed (with any grade) to progress the lesson. - - `pass`: A passing grade must be earned to progress the lesson. - type: string - enum: - - complete - - pass - default: complete - diff --git a/spec/components/schemas/LessonRequest.yaml b/spec/components/schemas/LessonRequest.yaml deleted file mode 100644 index d2cc5328..00000000 --- a/spec/components/schemas/LessonRequest.yaml +++ /dev/null @@ -1,3 +0,0 @@ -allOf: - - $ref: '#/components/schemas/PostContentRequest' - - $ref: '#/components/schemas/Lesson' diff --git a/spec/components/schemas/LessonResponse.yaml b/spec/components/schemas/LessonResponse.yaml deleted file mode 100644 index f185ac3d..00000000 --- a/spec/components/schemas/LessonResponse.yaml +++ /dev/null @@ -1,115 +0,0 @@ -allOf: - - $ref: '#/components/schemas/PostContentResponse' - - $ref: '#/components/schemas/Lesson' - - type: object - properties: - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the lesson. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/lessons/1234 - collection: - description: REST URI to the lesson collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/lessons - assignment: - description: REST URI to the lesson's assignment. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/assignments/876 - course: - description: REST URI to the lesson's parent course. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses/1234 - next: - description: REST URI to the next sibling lesson in the section. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/lessons/4567 - prerequisite: - description: REST URIs to lesson prerequisite resources. - type: array - items: - type: object - properties: - type: - type: string - example: lesson - href: - type: string - example: /wp-json/llms/v1/lessons/321 - previous: - description: REST URI to the previous sibling lesson in the section. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/lessons/8910 - parent: - description: REST URI to the lessons's parent. - type: array - items: - type: object - properties: - type: - type: string - example: section - href: - type: string - example: /wp-json/llms/v1/sections/987 - quiz: - description: REST URI to the lesson's quiz. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/quizzes/432 - siblings: - description: REST URI to the collection of the lessons's siblings within its parent. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/lessons?parent=987 - wp:featured_media: - description: REST URI to the WordPress attachement image. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/wp/v2/media/987 diff --git a/spec/components/schemas/Membership.yaml b/spec/components/schemas/Membership.yaml deleted file mode 100644 index 5ce81220..00000000 --- a/spec/components/schemas/Membership.yaml +++ /dev/null @@ -1,55 +0,0 @@ -allOf: - - type: object - properties: - id: - readOnly: true - description: Unique membership identifier. The WordPress Post `ID`. - - $ref: '#/components/schemas/PostPublic' - - type: object - properties: - permalink: - example: https://example.com/membership/getting-started-with-lifterlms - post_type: - default: membership - type: string - categories: - description: List of membership categories. - type: array - items: - type: integer - tags: - description: List of membership tags. - type: array - items: - type: integer - restriction_action: - description: | - Determines the action to take when content restricted by the membership is accessed by a non-member.
- `none`: Remain on page and display the message `restriction_message`. - `membership`: Redirect to the membership's permalink. - `page`: Redirect to the permalink of the page identified by `restriction_page_id`. - `custom`: Redirct to the URL identified by `restriction_url`. - type: string - enum: - - none - - membership - - page - - custom - default: none - restriction_page_id: - description: WordPress page ID used for redirecting non-members when `restriction_action` is `page`. - type: integer - minimum: 1 - example: 456 - restriction_url: - description: URL used for redirecting non-members when `restriction_action` is `custom`. - type: string - example: https://example.tld/my-custom-url - auto_enroll: - description: List of courses to automatically enroll students into when they're enrolled into the membership. - type: array - default: [] - example: [ 456, 789 ] - items: - type: integer - - $ref: '#/components/schemas/SharedCourseMembership' diff --git a/spec/components/schemas/MembershipRequest.yaml b/spec/components/schemas/MembershipRequest.yaml deleted file mode 100644 index afc6434d..00000000 --- a/spec/components/schemas/MembershipRequest.yaml +++ /dev/null @@ -1,33 +0,0 @@ -allOf: - - $ref: '#/components/schemas/PostContentRequest' - - type: object - properties: - restriction_message: - description: Message to display to non-members after a `restriction_action` redirct. When `restriction_action` is `none` replaces the page content with this message. - type: string - default: You must belong to the [lifterlms_membership_link id="1234"] membership to access this content. - # access_closes_message: - # description: Message displayed to enrolled students when the course is accessed after the `access_closes_date` has passed. - # type: string - # default: This course closed on [lifterlms_course_info key="end_date"]. - # enrollment_opens_message: - # description: Message displayed to visitors when attempting to enroll into a course before the `enrollment_opens_date` has passed. - # type: string - # default: Enrollment in this course opens on [lifterlms_course_info key="enrollment_start_date"]. - # enrollment_closes_message: - # description: Message displayed to visitors when attempting to enroll into a course after the `enrollment_closes_date` has passed. - # type: string - # default: Enrollment in this course closed on [lifterlms_course_info key="enrollment_end_date"]. - # capacity_message: - # description: Message displayed when enrollment capacity has been reached. - # type: string - # default: Enrollment has closed because the maximum number of allowed students has been reached. - # length: - # description: User defined course length. - # type: string - # example: 7 days - # restricted_message: - # description: Message displayed when non-enrolled visitors try to access restricted course content (lessons, quizzes, etc..) directly. - # type: string - # default: You must enroll in this course to access course content. - - $ref: '#/components/schemas/Membership' diff --git a/spec/components/schemas/MembershipResponse.yaml b/spec/components/schemas/MembershipResponse.yaml deleted file mode 100644 index 2c616e82..00000000 --- a/spec/components/schemas/MembershipResponse.yaml +++ /dev/null @@ -1,125 +0,0 @@ -allOf: - - $ref: '#/components/schemas/PostContentResponse' - - $ref: '#/components/schemas/Membership' - - type: object - properties: - restriction_message: - description: Message to display to non-members after a `restriction_action` redirct. When `restriction_action` is `none` replaces the page content with this message. - type: object - properties: - rendered: - description: Rendered message content. - type: string - default: You must belong to the Gold membership to access this content. - raw: - description: Raw message content. - type: string - default: You must belong to the [lifterlms_membership_link id="1234"] membership to access this content. - - type: object - properties: - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the membership. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/memberships/1234 - collection: - description: REST URI to the membership collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/memberships - access_plans: - description: REST URI to the collection of access plans for the membership. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/access-plans?post_id=1234 - auto_enrollment_courses: - description: REST URI to the collection of automatic enrollment courses for the membership. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses?include=456,789 - enrollments: - description: REST URI to the collection of the memberships's enrollments. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/enrollments?post=1234 - instructors: - description: REST URI to the collection of the membership's instructors. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/instructors?post=1234 - students: - description: REST URI to the collection of the membership's enrolled students. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students?enrolled_in=1234 - wp:featured_media: - description: REST URI to the WordPress attachement image. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/wp/v2/media/987 - wp:term: - description: Collection of REST URIs to the membership's taxonomy term information. - type: array - example: [ - { - "taxonomy": "membership_cat", - "href": "/wp-json/wp-v2/membership_cat?post=123" - }, - { - "taxonomy": "membership_tag", - "href": "/wp-json/wp-v2/membership_tag?post=123" - }, - { - "taxonomy": "membership_difficulty", - "href": "/wp-json/wp-v2/membership_difficulty?post=123" - }, - { - "taxonomy": "membership_track", - "href": "/wp-json/wp-v2/membership_track?post=123" - } - ] - items: - type: object - properties: - taxonomy: - type: string - href: - type: string - diff --git a/spec/components/schemas/Post.yaml b/spec/components/schemas/Post.yaml deleted file mode 100644 index 720a3b37..00000000 --- a/spec/components/schemas/Post.yaml +++ /dev/null @@ -1,32 +0,0 @@ -description: Reduced WordPress Post object properties shared by LifterLMS custom post types -type: object -required: - - id -properties: - id: - allOf: - - description: Unique Post Identifier. The WordPress Post `ID`. - - $ref: '#/components/schemas/ResourceId' - date_created: - description: 'Creation date. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:22:05' - date_created_gmt: - description: 'Creation date (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:22:05' - date_updated: - description: 'Date last modified. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:25:05' - readOnly: true - date_updated_gmt: - description: 'Date last modified (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:25:05' - readOnly: true - menu_order: - description: Custom post sort order. - type: integer - default: 0 - minimum: 0 diff --git a/spec/components/schemas/PostContentRequest.yaml b/spec/components/schemas/PostContentRequest.yaml deleted file mode 100644 index eaac5bc6..00000000 --- a/spec/components/schemas/PostContentRequest.yaml +++ /dev/null @@ -1,16 +0,0 @@ -description: Post content request fields. -type: object -properties: - title: - type: string - description: Raw title. - example: Getting Started with LifterLMS - content: - type: string - description: Raw post content. - example: \n

Lorem ipsum dolor sit amet.

\n\n\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

\n - excerpt: - type: string - description: Raw excerpt content. - example: Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus. - diff --git a/spec/components/schemas/PostContentResponse.yaml b/spec/components/schemas/PostContentResponse.yaml deleted file mode 100644 index 1c892062..00000000 --- a/spec/components/schemas/PostContentResponse.yaml +++ /dev/null @@ -1,40 +0,0 @@ -description: Post content fields. -type: object -properties: - title: - description: Post title. - type: object - properties: - rendered: - type: string - description: Rendered title. - example: Getting Started with LifterLMS - raw: - type: string - description: Raw title. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example: Getting Started with LifterLMS - content: - description: Post content. - type: object - properties: - rendered: - type: string - description: Rendered post content. - example: \n

Lorem ipsum dolor sit amet.

\n\n\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

\n - raw: - type: string - description: Raw post content. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example: \n

Lorem ipsum dolor sit amet.

\n\n\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

\n - excerpt: - description: Post excerpt. - type: object - properties: - rendered: - type: string - description: Rendered HTML content. - example:

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

- raw: - type: string - description: Raw HTML content. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example: Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus. - diff --git a/spec/components/schemas/PostPublic.yaml b/spec/components/schemas/PostPublic.yaml deleted file mode 100644 index c93daf51..00000000 --- a/spec/components/schemas/PostPublic.yaml +++ /dev/null @@ -1,42 +0,0 @@ -description: Reduced WordPress Post object properties shared by LifterLMS custom post types -allOf: - - $ref: '#/components/schemas/Post' - - type: object - properties: - slug: - description: Post URL slug. - type: string - example: getting-started-with-lifterlms - permalink: - description: Post URL. - type: string - example: https://example.com/post/getting-started-with-lifterlms - readOnly: true - post_type: - allOf: - - $ref: '#/components/schemas/PostType' - - readOnly: true - status: - $ref: '#/components/schemas/PostStatus' - password: - description: Password used to protect access to the content.
Readable only in `edit` context. - type: string - example: p4$sW0rd - featured_media: - description: Featured image ID. - type: integer - example: 987 - comment_status: - description: Post comment status. Default comment status dependent upon general WordPress post discussion settings. - type: string - enum: - - open - - closed - default: open - ping_status: - description: Post ping status. Default ping status dependent upon general WordPress post discussion settings. - type: string - enum: - - open - - closed - default: open diff --git a/spec/components/schemas/PostStatus.yaml b/spec/components/schemas/PostStatus.yaml deleted file mode 100644 index b5b56c39..00000000 --- a/spec/components/schemas/PostStatus.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: The publication status of the course. -type: string -enum: - - publish - - pending - - draft - - auto-draft - - future - - private - - trash -default: publish diff --git a/spec/components/schemas/PostType.yaml b/spec/components/schemas/PostType.yaml deleted file mode 100644 index 7c3dbfe1..00000000 --- a/spec/components/schemas/PostType.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: LifterLMS custom post types available for enrollments -type: string -enum: - - course - - llms_membership - - section -default: course diff --git a/spec/components/schemas/Progress.yaml b/spec/components/schemas/Progress.yaml deleted file mode 100644 index 918abd71..00000000 --- a/spec/components/schemas/Progress.yaml +++ /dev/null @@ -1,82 +0,0 @@ -type: object -required: - - status -properties: - student_id: - description: The ID of the student. - type: integer - minimum: 1 - example: 123 - readOnly: true - post_id: - description: The ID of the course, section, or lesson. - type: integer - minimum: 1 - example: 456 - readOnly: true - date_created: - description: The progress creation date. Cannot be in the future. - type: string - format: date-time - example: '2019-05-21T14:22:05' - date_updated: - description: The date of the last progress update. - type: string - format: date-time - example: '2019-05-21T19:22:05' - readOnly: true - progress: - description: Student's progress as a percentage. - type: number - format: float - minimum: 0 - maximum: 100 - default: 0 - example: 89.83 - readOnly: true - status: - description: Student progress status. - type: string - enum: - - incomplete - - complete - default: incomplete - _links: - description: A map of links to other related API resources. - readOnly: true - type: object - properties: - self: - description: REST URI to the progress. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/123/progress/456 - post: - description: Rest URI to the post resource. - type: array - items: - type: object - properties: - type: - type: string - enum: - - course - - section - - lesson - example: course - href: - type: string - example: /wp-json/llms/v1/courses/456 - student: - description: Rest URI to the student resource. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/123 diff --git a/spec/components/schemas/Quiz.yaml b/spec/components/schemas/Quiz.yaml deleted file mode 100644 index f607ec88..00000000 --- a/spec/components/schemas/Quiz.yaml +++ /dev/null @@ -1,103 +0,0 @@ -description: Base quiz post object. -type: object -properties: - id: - description: Unique quiz identifer. The WordPress Post `ID`. - type: integer - minimum: 234 - readOnly: true - date_created: - description: 'Creation date. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:22:05' - date_created_gmt: - description: 'Creation date (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:22:05' - date_updated: - description: 'Date last modified. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:25:05' - readOnly: true - date_updated_gmt: - description: 'Date last modified (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:25:05' - readOnly: true - slug: - description: Quiz URL slug. - type: string - example: final-exam - permalink: - description: Quiz URL. - type: string - example: https://example.tld/quiz/final-exam - readOnly: true - post_type: - allOf: - - $ref: '#/components/schemas/PostType' - - readOnly: true - type: string - default: llms_quiz - status: - description: The publication status of the quiz. - type: string - enum: - - publish - - draft - default: draft - attempt_limiting: - description: | - Determine if attempt limiting is enabled. - - When enabled, students are locked out after the number of attempts specified by `allowed_attempts`. - type: boolean - default: false - example: true - attempts_allowed: - description: Limit the number of times a student can attempt the quiz before the quiz is locked. Only used when `attempt_limiting` is `true`. - type: integer - minimum: 1 - time_limiting: - description: | - Determine if a time limit is enforced for each attempt. - - When enabled, a quiz attempt is automatically ended after the time period specified by `time_limit` has passed. - type: boolean - default: false - example: true - time_limit: - description: Determines the number of minutes allowed for each quiz attempt. Only used when `time_limiting` is `true`. - type: integer - minimum: 1 - example: 90 - passing_percentage: - description: Determines the grade required to consider an attempt "passing". - type: number - minimum: 0 - default: 65 - total_points: - description: The total points of all questions within the quiz. - type: integer - minimum: 0 - example: 10 - readOnly: true - show_correct_answer: - description: When enabled, students will be shown the correct answers to questions they answered incorrectly during quiz reviews. - type: boolean - default: false - randomize_questions: - description: When enabled, questions will be shuffled into a random order for each new quiz attempt. - type: boolean - default: false - course_id: - description: WordPress post ID of the quizzes's parent course. - type: integer - minimum: 1 - example: 1234 - readOnly: true - parent_id: - description: WordPress post ID of the parent item.
Must be a Lesson ID. `0` indicates an "orphaned" quiz which can be edited and viewed by instructors and admins but cannot be taken by students. - type: integer - minimum: 0 - example: 789 diff --git a/spec/components/schemas/QuizQuestion.yaml b/spec/components/schemas/QuizQuestion.yaml deleted file mode 100644 index a87f5e6d..00000000 --- a/spec/components/schemas/QuizQuestion.yaml +++ /dev/null @@ -1,57 +0,0 @@ -description: Base quiz question post object. -type: object -properties: - id: - description: Unique question identifer. The WordPress Post `ID`. - type: integer - minimum: 234 - readOnly: true - date_created: - description: 'Creation date. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:22:05' - date_created_gmt: - description: 'Creation date (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:22:05' - date_updated: - description: 'Date last modified. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:25:05' - readOnly: true - date_updated_gmt: - description: 'Date last modified (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:25:05' - readOnly: true - post_type: - allOf: - - $ref: '#/components/schemas/PostType' - - readOnly: true - type: string - default: llms_question - order: - description: Order of the question within its immediate parent. - type: integer - default: 1 - minimum: 1 - parent_id: - description: Resource ID of the question's parent (quiz). - type: integer - minimum: 1 - example: 234 - points: - description: Number of points awarded for correctly answering the question. - type: integer - minimum: 0 - default: 1 - example: 10 - video_embed: - description: URL to an oEmbed enable video URL. - type: string - example: https://www.youtube.com/watch?v=videoid - featured_media: - description: Featured image ID. - type: integer - example: 205 - diff --git a/spec/components/schemas/QuizQuestionRequest.yaml b/spec/components/schemas/QuizQuestionRequest.yaml deleted file mode 100644 index 5a32c721..00000000 --- a/spec/components/schemas/QuizQuestionRequest.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -properties: - title: - description: Raw quiz title. Most likely in the form of a question. - type: string - example: What is your favorite color? - content: - description: Raw quiz content. Useful for providing additional information or context to the question. - type: string - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

- answer_clarification: - description: Raw additional clarifying information displayed on the quiz attempt review screen when the question was answered incorrectly. - type: string - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

diff --git a/spec/components/schemas/QuizQuestionResponse.yaml b/spec/components/schemas/QuizQuestionResponse.yaml deleted file mode 100644 index 016590ca..00000000 --- a/spec/components/schemas/QuizQuestionResponse.yaml +++ /dev/null @@ -1,38 +0,0 @@ -type: object -properties: - title: - description: Quiz title. Most likely in the form of a question. - type: object - properties: - rendered: - type: string - description: Rendered title. - example: What is your favorite color? - raw: - type: string - description: Raw title. Useful when displaying title in the WP Editor. Only returned in `edit` context. - example: What is your favorite color? - content: - description: Quiz content. Useful for providing additional information or context to the question. - type: object - properties: - rendered: - type: string - description: Rendered content. - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

- raw: - type: string - description: Raw content. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

- answer_clarification: - description: Additional clarifying information displayed on the quiz attempt review screen when the question was answered incorrectly. - type: object - properties: - rendered: - type: string - description: Rendered content. - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

- raw: - type: string - description: Raw content. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

diff --git a/spec/components/schemas/QuizQuestionTypeBlank.yaml b/spec/components/schemas/QuizQuestionTypeBlank.yaml deleted file mode 100644 index 172b1841..00000000 --- a/spec/components/schemas/QuizQuestionTypeBlank.yaml +++ /dev/null @@ -1,19 +0,0 @@ -title: Fill in the Blank -description: Fill in the Blank quiz question type -allOf: - - $ref: '#/components/schemas/QuizQuestion' - - type: object - properties: - question_type: - description: The type of question. - type: string - default: blank - correct_value: - description: | - Specify the correct value(s) for each blank in the `title` property and enable automatic grading of the question. - - For questions with multiple blanks, separate each blank by with a pipe (`|`) character. The correct values should be supplied in the same order as the blanks. - type: string - example: 'foo|bar' - - diff --git a/spec/components/schemas/QuizQuestionTypeChoice.yaml b/spec/components/schemas/QuizQuestionTypeChoice.yaml deleted file mode 100644 index d0a07ac7..00000000 --- a/spec/components/schemas/QuizQuestionTypeChoice.yaml +++ /dev/null @@ -1,60 +0,0 @@ -title: Multiple Choice -description: Choice quiz question type -allOf: - - $ref: '#/components/schemas/QuizQuestion' - - type: object - properties: - question_type: - description: The type of question. - type: string - default: choice - choices: - description: A collection of choices available for the question. - type: array - minItems: 2 - maxItems: 26 - example: [ - { - "marker": "A", - "choice": "Red", - "correct": false - }, - { - "marker": "B", - "choice": "Green", - "correct": true - } - ] - items: - type: object - properties: - id: - description: Unique resource identifier for the choice. - type: string - readOnly: true - marker: - description: | - The marker used to visually identify and order the choices. - - Valid markers: `A` through `Z`. - - If no marker is supplied, the next available marker in the range will be used. - type: string - default: A - choice: - description: Raw choice text. - type: string - correct: - description: | - Determines if the choice is correct. - - When `multi_choices` is disabled, only one choice may be marked as `correct`. - type: boolean - default: false - multi_choices: - description: | - Enable multiple correct answers. - - When disabled only a single correct choice is available, when enabled, one or more correct choices are available. - type: boolean - default: false diff --git a/spec/components/schemas/QuizQuestionTypeContent.yaml b/spec/components/schemas/QuizQuestionTypeContent.yaml deleted file mode 100644 index abb668e0..00000000 --- a/spec/components/schemas/QuizQuestionTypeContent.yaml +++ /dev/null @@ -1,15 +0,0 @@ -title: Content -description: Content quiz question type -allOf: - - type: object - properties: - question_type: - description: The type of question. - type: string - default: content - points: - type: integer - readOnly: true - example: 0 - default: 0 - - $ref: '#/components/schemas/QuizQuestion' diff --git a/spec/components/schemas/QuizQuestionTypeLongAnswer.yaml b/spec/components/schemas/QuizQuestionTypeLongAnswer.yaml deleted file mode 100644 index 4b2463dc..00000000 --- a/spec/components/schemas/QuizQuestionTypeLongAnswer.yaml +++ /dev/null @@ -1,20 +0,0 @@ -title: Long Answer -description: Long answer quiz question type -allOf: - - $ref: '#/components/schemas/QuizQuestion' - - type: object - properties: - question_type: - description: The type of question. - type: string - default: long_answer - words_min: - description: Minimum word count for the answer. Setting the minimum at `0` disables the minimum word count. - type: integer - minimum: 0 - example: 500 - words_max: - description: Maximum word count for the answer. Setting the maximum at `0` disables the maximum word count. - type: integer - minimum: 0 - example: 10000 diff --git a/spec/components/schemas/QuizQuestionTypePictureChoice.yaml b/spec/components/schemas/QuizQuestionTypePictureChoice.yaml deleted file mode 100644 index 2d5ef7b7..00000000 --- a/spec/components/schemas/QuizQuestionTypePictureChoice.yaml +++ /dev/null @@ -1,75 +0,0 @@ -title: Picture Choice -description: Picuter choice quiz question type -allOf: - - $ref: '#/components/schemas/QuizQuestion' - - type: object - properties: - question_type: - description: The type of question. - type: string - default: picture_choice - choices: - description: A collection of choices available for the question. - type: array - minItems: 2 - maxItems: 26 - example: [ - { - "marker": "A", - "choice": { - "id": 98, - "src": "https://mysite.tld/wp-content/uploads/2019/05/picture-choice-img-1.png" - }, - "correct": false - }, - { - "marker": "B", - "choice": { - "id": 99, - "src": "https://mysite.tld/wp-content/uploads/2019/05/picture-choice-img-2.png" - }, - "correct": true - } - ] - items: - type: object - properties: - id: - description: Unique resource identifier for the choice. - type: string - readOnly: true - marker: - description: | - The marker used to visually identify and order the choices. - - Valid markers: `A` through `Z`. - - If no marker is supplied, the next available marker in the range will be used. - type: string - default: A - choice: - description: Object of image information for the choice. - type: object - properties: - id: - description: WP Attachment ID for the choice image. - type: integer - minimum: 1 - src: - description: Full URL to the image resource on the server. Only returned in edit context - type: string - readOnly: true - correct: - description: | - Determines if the choice is correct. - - When `multi_choices` is disabled, only one choice may be marked as `correct`. - type: boolean - default: false - multi_choices: - description: | - Enable multiple correct answers. - - When disabled only a single correct choice is available, when enabled, one or more correct choices are available. - type: boolean - default: false diff --git a/spec/components/schemas/QuizQuestionTypeTrueFalse.yaml b/spec/components/schemas/QuizQuestionTypeTrueFalse.yaml deleted file mode 100644 index 6a722369..00000000 --- a/spec/components/schemas/QuizQuestionTypeTrueFalse.yaml +++ /dev/null @@ -1,48 +0,0 @@ -title: True / False -description: True / False quiz question type -allOf: - - $ref: '#/components/schemas/QuizQuestion' - - type: object - properties: - question_type: - description: The type of question. - type: string - default: true_false - choices: - description: A collection of choices available for the question. - type: array - minItems: 2 - maxItems: 2 - example: [ - { - "marker": "A", - "choice": "True", - "correct": false - }, - { - "marker": "B", - "choice": "False", - "correct": true - } - ] - items: - type: object - properties: - id: - description: Unique resource identifier for the choice. - type: string - readOnly: true - marker: - description: The marker used to visually identify and order the choices. - type: string - enum: - - A - - B - default: A - choice: - description: Raw choice text. - type: string - correct: - description: Determines if the choice is correct. - type: boolean - default: false diff --git a/spec/components/schemas/QuizQuestionTypesResponseList.yaml b/spec/components/schemas/QuizQuestionTypesResponseList.yaml deleted file mode 100644 index 980cbad8..00000000 --- a/spec/components/schemas/QuizQuestionTypesResponseList.yaml +++ /dev/null @@ -1,25 +0,0 @@ -anyOf: - - title: Multiple Choice - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeChoice' - - $ref: '#/components/schemas/QuizQuestionResponse' - - title: Picture Choice - allOf: - - $ref: '#/components/schemas/QuizQuestionTypePictureChoice' - - $ref: '#/components/schemas/QuizQuestionResponse' - - title: True / False - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeTrueFalse' - - $ref: '#/components/schemas/QuizQuestionResponse' - - title: Content - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeContent' - - $ref: '#/components/schemas/QuizQuestionResponse' - - title: Fill in the Blank - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeBlank' - - $ref: '#/components/schemas/QuizQuestionResponse' - - title: Long Answer - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeLongAnswer' - - $ref: '#/components/schemas/QuizQuestionResponse' diff --git a/spec/components/schemas/QuizRequest.yaml b/spec/components/schemas/QuizRequest.yaml deleted file mode 100644 index dd08bf92..00000000 --- a/spec/components/schemas/QuizRequest.yaml +++ /dev/null @@ -1,12 +0,0 @@ -allOf: - - $ref: '#/components/schemas/Quiz' - - type: object - properties: - title: - type: string - description: Raw title. - example: Final Exam - content: - type: string - description: Raw content. - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

diff --git a/spec/components/schemas/QuizResponse.yaml b/spec/components/schemas/QuizResponse.yaml deleted file mode 100644 index 9cff89fd..00000000 --- a/spec/components/schemas/QuizResponse.yaml +++ /dev/null @@ -1,72 +0,0 @@ -allOf: - - $ref: '#/components/schemas/Quiz' - - type: object - properties: - title: - description: Quiz title. - type: object - properties: - rendered: - type: string - description: Rendered title. - example: Final Exam - raw: - type: string - description: Raw title. Useful when displaying title in the WP Editor. Only returned in `edit` context. - example: Final Exam - content: - description: Post content. - type: object - properties: - rendered: - type: string - description: Rendered content. - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

- raw: - type: string - description: Raw content. Useful when displaying title in the WP Block Editor. Only returned in `edit` context. - example:

Lorem ipsum dolor sit amet.

\n\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

- _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the lesson. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/quizzes/234 - collection: - description: REST URI to the lesson collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/quizzes - course: - description: REST URI to the lesson's parent course. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses/1234 - parent: - description: REST URI to the quiz's parent. - type: array - items: - type: object - properties: - type: - type: string - example: course - href: - type: string - example: /wp-json/llms/v1/lessons/789 diff --git a/spec/components/schemas/ResourceId.yaml b/spec/components/schemas/ResourceId.yaml deleted file mode 100644 index 25b661d9..00000000 --- a/spec/components/schemas/ResourceId.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Unique Resource Identifier. -type: integer -minimum: 1 -example: 123 -readOnly: true diff --git a/spec/components/schemas/Section.yaml b/spec/components/schemas/Section.yaml deleted file mode 100644 index ee671f87..00000000 --- a/spec/components/schemas/Section.yaml +++ /dev/null @@ -1,43 +0,0 @@ -type: object -properties: - id: - allOf: - - description: Unique section identifier. The WordPress Post `ID`. - readOnly: true - - $ref: '#/components/schemas/ResourceId' - - example: 987 - date_created: - description: 'Creation date. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:22:05' - date_created_gmt: - description: 'Creation date (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:22:05' - date_updated: - description: 'Date last modified. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:25:05' - readOnly: true - date_updated_gmt: - description: 'Date last modified (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:25:05' - readOnly: true - order: - description: Order of the section within the course. - type: integer - default: 1 - minimum: 1 - parent_id: - description: WordPress post ID of the parent item.
Must be a Course ID. - type: integer - minimum: 1 - example: 1234 - post_type: - allOf: - - $ref: '#/components/schemas/PostType' - - type: string - default: section - readOnly: true - diff --git a/spec/components/schemas/SectionRequest.yaml b/spec/components/schemas/SectionRequest.yaml deleted file mode 100644 index ed449305..00000000 --- a/spec/components/schemas/SectionRequest.yaml +++ /dev/null @@ -1,12 +0,0 @@ -allOf: - - type: object - required: - - title - - order - - parent_id - properties: - title: - type: string - description: Raw title. - example: Getting Started with LifterLMS - - $ref: '#/components/schemas/Section' diff --git a/spec/components/schemas/SectionResponse.yaml b/spec/components/schemas/SectionResponse.yaml deleted file mode 100644 index d2b1c608..00000000 --- a/spec/components/schemas/SectionResponse.yaml +++ /dev/null @@ -1,88 +0,0 @@ -allOf: - - $ref: '#/components/schemas/Section' - - type: object - properties: - title: - description: Section Title - type: object - properties: - rendered: - description: Rendered title. - type: string - example: Introduction - raw: - description: Raw title. - type: string - example: Introduction - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the section. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/sections/1234 - collection: - description: REST URI to the section collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/sections - content: - description: REST URI to the section's child content. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/sections/1234/content - next: - description: REST URI to the next sibling section in the course. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/sections/3456 - parent: - description: REST URI to the section's parent. - type: array - items: - type: object - properties: - type: - type: string - example: course - href: - type: string - example: /wp-json/llms/v1/courses/1234 - prevous: - description: REST URI to the prevous sibling section in the course. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/sections/7891 - siblings: - description: REST URI to the collection of the section's siblings within its parent. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/courses/1234/content?exclude=7891 - diff --git a/spec/components/schemas/SharedCourseMembership.yaml b/spec/components/schemas/SharedCourseMembership.yaml deleted file mode 100644 index bc033bc0..00000000 --- a/spec/components/schemas/SharedCourseMembership.yaml +++ /dev/null @@ -1,62 +0,0 @@ -description: Properties shared by courses and memberships. -type: object -properties: - catalog_visibility: - description: Visibility of the post in catalogs and search results. - type: string - enum: - - catalog_search - - catalog - - search - - hidden - default: catalog_search - categories: - description: List of post categories. - type: array - default: [] - example: [ 1, 2, 3 ] - items: - type: integer - tags: - description: List of post tags. - type: array - default: [] - example: [ 4, 5, 6 ] - items: - type: integer - instructors: - description: List of post instructors. Defaults to current user when creating a new post. - type: array - default: [] - example: [ 1, 2, 3 ] - minItems: 1 - items: - type: integer - sales_page_type: - description: >- - Defines alternate content displayed to visitors and non-enrolled students when accessing the post.
- - `none` displays the post content.
- - `content` displays alternate content from the `excerpt` property.
- - `page` redirects to the WordPress page defined in `content_page_id`.
- - `url` redirects to the URL defined in `content_page_url`. - type: string - enum: - - none - - content - - page - - url - default: none - sales_page_page_id: - description: >- - The WordPress page ID of the sales page.
- Required when `sales_page_type` equals `page`.
- Only returned when the `sales_page_type` equals `page`. - type: integer - example: 543 - sales_page_url: - description: >- - The URL of the sales page content.
- Required when `sales_page_type` equals `url`.
- Only returned when the `sales_page_type` equals `url`. - type: string - example: https://example.tld/custom-sales-page diff --git a/spec/components/schemas/Student.yaml b/spec/components/schemas/Student.yaml deleted file mode 100644 index b0b99ccc..00000000 --- a/spec/components/schemas/Student.yaml +++ /dev/null @@ -1,56 +0,0 @@ -allOf: - - type: object - properties: - id: - description: Unique Student Identifer. The WordPress User `ID`. - readOnly: true - - $ref: '#/components/schemas/User' - - type: object - properties: - roles: - description: The user's WordPress user role. - type: array - default: [ student ] - items: - type: string - _links: - description: A map of links to other related API resources. - type: object - readOnly: true - properties: - self: - description: REST URI to the student. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/456 - collection: - description: REST URI to the student collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students - enrollments: - description: REST URI to a collection of the student's enrollments. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/456/enrollments - progress: - description: REST URI to a collection of the student's progress records. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/students/456/progress diff --git a/spec/components/schemas/User.yaml b/spec/components/schemas/User.yaml deleted file mode 100644 index 3f4d7128..00000000 --- a/spec/components/schemas/User.yaml +++ /dev/null @@ -1,91 +0,0 @@ -description: Reduced WordPress User object properties shared by LifterLMS custom user types -type: object -properties: - id: - allOf: - - $ref: '#/components/schemas/ResourceId' - - description: Unique User Identifer. The WordPress User `ID`. - example: 456 - email: - description: The user's email address. - type: string - example: jamie@lifterlms.com - username: - description: The user's username. - type: string - example: jamie2019 - password: - description: The user's password. - type: string - example: my_l337-p@$5w0rd! - writeOnly: true - description: - description: The user's biography or description. - type: string - example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. - registered_date: - description: The user's original site registration date. - type: string - example: '2019-05-03 19:25:01' - avatar_urls: - description: | - A list of the Gravatars available for the user. - - The object key is the size (in pixels) of the avatar and the value is the Gravatar's URL. - type: object - readOnly: true - properties: - 24: - type: string - example: https://secure.gravatar.com/avatar/30eab7b16342fe5f772ed30a36da2763?s=24&d=mm&r=g - 48: - type: string - example: https://secure.gravatar.com/avatar/30eab7b16342fe5f772ed30a36da2763?s=48&d=mm&r=g - 96: - type: string - example: https://secure.gravatar.com/avatar/30eab7b16342fe5f772ed30a36da2763?s=48&d=mm&r=g - url: - description: The user's URL. - type: string - example: https://myawesomewebsite.tld - first_name: - description: The user's first name. - type: string - example: Jamie - last_name: - description: The user's last name. - type: string - example: Cook - nickname: - description: The user's chosen nickname. - type: string - example: JamieC - name: - description: The user's public display name. - type: string - example: Jamie Cook - billing_address_1: - description: Address line 1. - type: string - example: 1234 Somewhere Place - billing_address_2: - description: Address line 2. - type: string - example: Suite ABC - billing_city: - description: City name. - type: string - example: Anywhere - billing_state: - description: ISO code or state, province, or district name. - type: string - example: CA - billing_postcode: - description: Postal code. - type: string - example: 12345-678 - billing_country: - description: ISO country code. - type: string - example: US - diff --git a/spec/components/schemas/UserName.yaml b/spec/components/schemas/UserName.yaml deleted file mode 100644 index 6a5637dc..00000000 --- a/spec/components/schemas/UserName.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: object -properties: - first: - description: The person's first name. - type: string - example: Jamie - last: - description: The person's last name. - type: string - example: Cook - display: - description: The person's public display name. - type: string - example: Jamie Cook diff --git a/spec/components/schemas/Webhook.yaml b/spec/components/schemas/Webhook.yaml deleted file mode 100644 index 8f54c58b..00000000 --- a/spec/components/schemas/Webhook.yaml +++ /dev/null @@ -1,100 +0,0 @@ -type: object -properties: - id: - allOf: - - description: Unique webhook Identifier. The WordPress post `ID`. - - $ref: '#/components/schemas/ResourceId' - - example: 654 - name: - description: A friendly, human-readable name for the webhook. - type: string - minimum: 1 - example: A Student Enrolled in a Course - status: - description: | - The status of the webhook. - - + `active`: Payload will be delivered - + `paused`: Delivery is disabled by an admin. - + `disabled`: Delivery is disabled because of delivery failure. - type: string - enum: - - active - - paused - - disabled - default: active - topic: - description: The Webhook topic. - type: string - example: student.created - url: - description: The webhook payload delivery URL. - type: string - example: https://example.tld/webhook-receipt/endpoint - secret: - description: | - An optional secret key used to generate the webhook delivery signature. - - If no secret is supplied and random string will be generated using `wp_generate_password()`. - type: string - example: $P3CI41-$3CR37! - resource: - description: The parsed `topic` resource. - type: string - readOnly: true - example: student - event: - description: The parsed `topic` event. - type: string - readOnly: true - example: created - hooks: - description: An array of hook names associated with the topic. - type: array - items: - type: string - example: 'llms_user_registered' - readOnly: true - date_created: - description: 'Creation date. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:22:05' - readOnly: true - date_created_gmt: - description: 'Creation date (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:22:05' - readOnly: true - date_updated: - description: 'Date last modified. Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 17:25:05' - readOnly: true - date_updated_gmt: - description: 'Date last modified (in GMT). Format: `Y-m-d H:i:s`.' - type: string - example: '2019-05-20 13:25:05' - readOnly: true - _links: - description: A map of links to other related API resources. - readOnly: true - type: object - properties: - self: - description: REST URI to the webhook. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/webhooks/654 - collection: - description: REST URI to the webhooks collection. - type: array - items: - type: object - properties: - href: - type: string - example: /wp-json/llms/v1/webhooks/ diff --git a/spec/components/securitySchemes/Basic-Authentication.yaml b/spec/components/securitySchemes/Basic-Authentication.yaml deleted file mode 100644 index d0166009..00000000 --- a/spec/components/securitySchemes/Basic-Authentication.yaml +++ /dev/null @@ -1,2 +0,0 @@ -type: http -scheme: basic diff --git a/spec/openapi.yaml b/spec/openapi.yaml deleted file mode 100644 index f3bddcc9..00000000 --- a/spec/openapi.yaml +++ /dev/null @@ -1,361 +0,0 @@ -openapi: 3.0.0 -info: - version: 1.0.0-beta.1 - title: LifterLMS REST API - description: >- - # Introduction - - LifterLMS (LLMS) is fully integrated with the [WordPress REST API](https://developer.wordpress.org/rest-api/). This allows LifterLMS data to be created, read, updated, and deleted using requests in JSON format and using WordPress REST API Authentication methods and standard HTTP verbs which are understood by most HTTP clients. - - ## Public Beta - - As of LifterLMS version 3.34.0, the LifterLMS REST API is included in the LifterLMS core plugin for public evaluation and testing. - - The specification may change slightly over the next few months as we evaluate feedback and use-cases. If you are building integrations relying on the REST API please keep your eye on our changelog and let us know how things are going! - - If you're interested in contributing or discussing the REST API, please join us in [GitHub](https://github.com/gocodebox/lifterlms-rest) and post in `#developers` on the [LifterLMS Community Slack](https://lifterlms.com/slack). - - ## Requirements - - To use the latest version of the REST API you must be using the following: - - + LifterLMS Version 3.34.0+. - + WordPress 5.2+. - + Pretty permalinks in `Settings -> Permalinks` so that the custom endpoints are supported. **Default permalinks will not work.** - + An SSL certificate. - - ## Libraries and Tools - - ### Official Libraries - - LifterLMS develops and maintains official libraries for different programming languages so you can easily build around the REST API. - - + [Node/Javascript](https://github.com/gocodebox/llms-api-node) - + PHP (coming soon) - - ### Tools - - Some useful tools to help develop and access the REST API: - - + [Postman](https://www.getpostman.com/) - A multi platform REST API GUI client. - + [RESTCLient](https://addons.mozilla.org/en-US/firefox/addon/restclient/) - A free Firefox add-on. - + [Advanced REST client](https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo) - A free Google Chrome extension. - + [RequestBin](https://requestbin.com/) - A free service allowing you to quickly test webhooks. - - # Authentication - - Requests to most API resources require authentication. Authentication can be preformed by providing API Credentials by using as the username and password via [HTTP Basic Authentication](http://en.wikipedia.org/wiki/Basic_access_authentication) or through request headers. - - - Requests to the REST API may only be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). Requests made over HTTP will fail. - - ## Basic Authentication - - The preferred authentication method is HTTP Basic Authentication. - - To use HTTP Basic Auth, provide the Consumer Key as the username and the Consumer Secret as the password. - - ``` - curl https://example.tld/wp-json/llms/v1/courses \ - -u ck_d7W85twOWT0poKzDSAQzI7:sk_8bsMmRfjW1HgEFw5ad7BIF - ``` - - ## Header Authentication - - Alternatively, requests may be authenticated by providing the Consumer Key and Consumer secret as the request headers `X-LLMS-CONSUMER-KEY` and `X-LLMS-CONSUMER-SECRET`. - - ``` - curl https://example.tld/wp-json/llms/v1/courses \ - -H X-LLMS-CONSUMER-KEY: ck_d7W85twOWT0poKzDSAQzI7 \ - -H X-LLMS-CONSUMER-SECRET: sk_8bsMmRfjW1HgEFw5ad7BIF - ``` - - x-logo: - altText: LifterLMS - url: "https://gocodebox.github.io/lifterlms-brand/assets/img/png/logo/lifterlms-logo.png" - href: "https://lifterlms.com/" - -servers: - - url: /wp-json/llms/v1 - -security: - - Basic-Authentication: [] - -tags: - - - name: API Keys - description: | - API Keys are used to authenticate REST API requests. - - The API keys API allows you to create, view, update, and delete API keys. - - ## API Key Properties - - - - - name: Access Plans - description: | - Access plans allow you to define how LMS content is purchased and accessed by your students. - - The access plans API allows you to create, view, update, and delete access plans. - - ## Access Plan Properties - - - - - name: Courses - description: | - The courses API allows you to create, view, update, and delete courses. - - ## Course Properties - - - - - name: Instructors - description: | - Instructors are members of your site who have the ability to create and manage LMS content and students. Instructors may be Adminstators, LMS Managers, Instructors, and Instructors Assistants. - - The instructors API allows you to create, view, update, and delete student accounts. - - ## Instructor Properties - - - - - name: Memberships - description: | - The memberships API allows you to create, view, update, and delete memberships. - - ## Membership Properties - - - - - name: Quiz Questions - description: | - The quiz questions API allows you to create, view, update, and delete quiz questions. - - ## Question Types - - There are four unique question types available via the LifterLMS Core: - - + Multiple Choice - + Picture Choice - + True / False - + Content - - An additional eight question types are available with the LifterLMS Advanced Quizzes Add-on: - - + Fill in the Blank - + Reorder Items - + Reorder Pictures - + Short Answer - + Long Answer - + File Upload - + Code - + Scale - - While these additional question types are documented here, they are only available when the LifterLMS Advanced Quizzes Add-on is installed and activated on your site. - - - name: Quizzes - description: | - The quizzes API allows you to create, view, update, and delete quizzes. - - ## Quiz Properties - - - - - name: Sections - description: | - The sections API allows you to create, view, update, and delete sections. - - Sections are used within courses to organize content (lessons) into groups. - - ## Section Properties - - - - - name: Students - description: | - Students are members of your site who are (or were) enrolled in your courses and memberships. Students can be any WordPress user account on your site (not exclusively the "student" role). - - The students API allows you to create, view, update, and delete student accounts as well as view information about the student's LMS content. - - ## Student Properties - - - - - name: Student Enrollments - description: | - The Student Enrollments API allows you to create, view, update, and delete records of a student's enrollment into courses and memberships. - - ## Enrollment Properties - - - - - name: Student Progress - description: | - The Student Progress API allows you to create, view, update, and delete a student's progress through courses. - - A student's progress through a course is calculated by dividing the number of lessons completed by the student by the total number of lessons available in a course. It is not possible to manually update the `progress` percentage property of a course, instead you must update the status of each lesson in the course. - - When updating the status of a course or a section, the status of the lessons within that course or section will be automatically updated to match the status of the course or section. For example, when updating a course's status to `complete` a new `complete` progress record will be created/updated for each incomplete lesson in the course. - - Finally, the `progress` property of a lesson will _always_ be either `0` _or_ `100` whereas the `progress` of courses and sections will range from `0` _to_ `100`. - - ## Progress Properties - - - - - name: Webhooks - description: | - Webhooks can be created to notify you about LMS-related events that happen on your site. - - The Webhooks API allows you to create, view, update, and delete webhooks. - - Webhooks may additionally be managed on the LifterLMS Webhooks screen on your site's WordPress admin panel. - - ## Topics - - The `topic` is a combination of the resource (e.g. student) and event (e.g. created). Each `topic` maps to one or more hook names (e.g. `llms_user_registered`). The proper hooks are automatically added based on the `topic`. - - The following topics are available: - - + Courses - + `course.created` - + `course.updated` - + `course.deleted` - + `course.restored` - + Sections - + `section.created` - + `section.updated` - + `section.deleted` - + `section.restored` - + Lessons - + `lesson.created` - + `lesson.updated` - + `lesson.deleted` - + `lesson.restored` - + Memberships - + `membership.created` - + `membership.updated` - + `membership.deleted` - + `membership.restored` - + Students - + `student.created` - + `student.updated` - + `student.deleted` - + Student Enrollment - + `enrollment.created` - + `enrollment.updated` - + `enrollment.deleted` - + Student Progress - + `progress.updated` - + `progress.deleted` - + Instructors - + `instructor.created` - + `instructor.updated` - + `instructor.deleted` - - Custom topics can also be used in order to create a webhook triggered by an arbitrary WordPress hook. For a custom topic use the `action` resource with any hook as the event. For example, to create a webhook triggered by the `user_register` hook the topic would be `action.user_register`. - - ## Delivery - - Webhook payloads are delivered in the background using wp-cron and `wp_remote_post()` (HTTP POST). - - Custom headers are supplied to assist with the receipt of the webhook: - - | Header | Description | Example | - | ------------------------ | -------------------------------------------------- | ------------------- | - | X-LLMS-Webhook-Source | The URL of the LifterLMS website. | https://example.tld | - | X-LLMS-Webhook-Topic | The webhook `topic` property. | student.created | - | X-LLMS-Webhook-Resource | The webhook `resource` property. | student | - | X-LLMS-Webhook-Event | The webhook `event` property. | created | - | X-LLMS-Webhook-Signature | A base64 encoded HMAC-SHA256 hash of the payload. | | - | X-LLMS-Webhook-ID | The unique webhook identifier (WordPress post ID). | 654 | - | X-LLMS-Delivery-ID | A unique ID for the webhook delivery. | 765 | - - The payload is a JSON-encoded object of the API resource as if retrieved by a `GET` request. - - The payload for a custom hook will be a JSON-encoded version of the first parameter supplied by the hook. - - ## Signature Verification - - Webhooks are signed by LifterLMS and the event's unique signature is included in the `X-LLMS-Webhook-Signature` header. The signature allows you to verify that the webhook was sent by LifterLMS and not by a third party. We recommend verifying all webhooks and discarding any payloads which cannot be verified. - - The `X-LLMS-Webhook-Signature` contains a timestamp and one or more signatures. The timestamp is prefixed by `t=` and the signatures are prefixed by `v` and an integer. Currently the only valid signature scheme is `v1`. - - ``` - X-LLMS-Webhook-Signature: t=1562715579,v1=0d579d62ef442b6e2d1d522924aafed480fdaaacbe498486a94445de8b995819 - ``` - - The signature is generated using a hash-based message authentication code ([HMAC](https://en.wikipedia.org/wiki/HMAC)) with [SHA-256](https://en.wikipedia.org/wiki/SHA-2). - - To verify a webhook signature you must construct an _expected_ webhook signature which you can then compare against the webhook signature supplied with delivery. - - #### Step 1: Extract the timestamps and signatures from the header - - Split the header, using the `,` character as the separator, to get a list of elements. Then split each element, using the `=` character as the separator, to get a prefix and value pair. - - The value for the prefix `t` corresponds to the timestamp, and `v1` corresponds to the signature. You can discard all other elements. - - #### Step 2: Prepare the payload string for signing - - You achieve this by concatenating: - - + The timestamp (as a string) - + The character `.` - + The actual JSON payload (i.e. the request's body) - - #### Step 3: Generate the expected signature string - - Compute an HMAC with the SHA256 hash function. Use the endpoints signing secret as the key, and use the string from Step 2 as the message. - - #### Step 4: Compare the signatures - - Compare the signature(s) in the header to the expected signature. If a signature matches, compute the difference between the current timestamp and the received timestamp, then decide if the difference is within your tolerance. We recommend accepting a difference of no more than five minutes between the provided timestamp and the current time. - - ## Webook Properties - - - -x-tagGroups: - - - name: API Keys - tags: - - API Keys - - - name: Courses - tags: - - Courses - - Sections - - Lessons - - # @todo: Implement - # - name: E-Commerce - # tags: - # - Access Plans - - - name: Instructors - tags: - - Instructors - - - name: Memberships - tags: - - Memberships - - # @todo: Implment. - # - name: Quizzes - # tags: - # - Quizzes - # - Quiz Questions - # - Quiz Attempts - - - name: Students - tags: - - Students - - Student Enrollments - - Student Progress - - - name: Webhooks - tags: - - Webhooks - diff --git a/spec/paths/README.md b/spec/paths/README.md deleted file mode 100644 index 8d584cde..00000000 --- a/spec/paths/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Paths -===== - -* Write each path specification in separate file -* Filename is mapped to path by replacing `@` with `/`, i.e. `user@{username}.yaml` matches to `user/{username}` path diff --git a/spec/paths/access-plans.yaml b/spec/paths/access-plans.yaml deleted file mode 100644 index 4fb0f740..00000000 --- a/spec/paths/access-plans.yaml +++ /dev/null @@ -1,90 +0,0 @@ -get: - summary: List access plans - description: Retrieve a list of access plans. - tags: - - Access Plans - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - title - - date_created - - date_updated - - menu_order - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: post_id - description: Retrieve access plans for a specific list of one or more posts. Accepts a course/membership id or comma separted list of course/membership ids. - in: query - schema: - type: string - example: 123,456 - responses: - 200: - description: Successfully returned a list of access plans. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/AccessPlanResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create an access plan - description: Create a new access plan object. - tags: - - Access Plans - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/AccessPlanRequest' - - required: - - title - - price - - post_id - responses: - 201: - description: Successfully created the student. - content: - application/json: - schema: - $ref: '#/components/schemas/AccessPlanResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/access-plans@{id}.yaml b/spec/paths/access-plans@{id}.yaml deleted file mode 100644 index 0dd99217..00000000 --- a/spec/paths/access-plans@{id}.yaml +++ /dev/null @@ -1,77 +0,0 @@ -parameters: - - name: id - in: path - description: Unique AccessPlan Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve an access plan - description: Retrieve the details of an existing access plan. - tags: - - Access Plans - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/PostPassword' - responses: - 200: - description: Successfully retrieved the access plan. - content: - application/json: - schema: - $ref: '#/components/schemas/AccessPlanResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update an access plan - description: >- - Update the specified access plan by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Access Plans - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AccessPlanRequest' - responses: - 200: - description: Successfully updated the access plan. - content: - application/json: - schema: - $ref: '#/components/schemas/AccessPlanResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete an access plan - description: Delete an existing access plan. - tags: - - Access Plans - responses: - 204: - description: Successfully deleted the access plan. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/api-keys.yaml b/spec/paths/api-keys.yaml deleted file mode 100644 index c533f32d..00000000 --- a/spec/paths/api-keys.yaml +++ /dev/null @@ -1,117 +0,0 @@ -get: - summary: List API keys - description: Retrieve a list of API keys. - tags: - - API Keys - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - description - - last_access - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: user - description: Include only keys for the specified user(s). Accepts a single id or a comma separated list of ids. - in: query - required: false - schema: - type: integer - example: [ 123, 456 ] - - name: user_not_in - description: Exclude keys for the specified user(s). Accepts a single id or a comma separated list of ids. - in: query - required: false - schema: - type: integer - example: [ 123, 456 ] - - name: permissions - description: Include only API keys matching a specific permission. - in: query - required: false - schema: - type: string - enum: - - read - - write - - read_write - responses: - 200: - description: Successfully returned a list of API keys. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/APIKey' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create an API key - description: Create a new API key. - tags: - - API Keys - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/APIKey' - - required: - - user_id - - description - - permissions - responses: - 201: - description: Successfully created the student. - content: - application/json: - schema: - allOf: - - type: object - properties: - consumer_key: - description: The Consumer Key. Only returned once with the initial creation request. - type: string - example: ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - consumer_secret: - description: The Consumer Secret. Only returned once with the initial creation request. - type: string - example: cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - - $ref: '#/components/schemas/APIKey' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/api-keys@{id}.yaml b/spec/paths/api-keys@{id}.yaml deleted file mode 100644 index 603482b0..00000000 --- a/spec/paths/api-keys@{id}.yaml +++ /dev/null @@ -1,74 +0,0 @@ -parameters: - - name: id - in: path - description: Unique API Key Identifier. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve an API key - description: Retrieve the details of an existing API key. - tags: - - API Keys - parameters: - - $ref: '#/components/parameters/Context' - responses: - 200: - description: Successfully retrieved the API key. - content: - application/json: - schema: - $ref: '#/components/schemas/APIKey' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update an API key - description: >- - Update the specified API key by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - API Keys - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/APIKey' - responses: - 200: - description: Successfully updated the API key. - content: - application/json: - schema: - $ref: '#/components/schemas/APIKey' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete an API key - description: Delete an existing API key. - tags: - - API Keys - responses: - 204: - description: Successfully deleted the API key. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/courses.yaml b/spec/paths/courses.yaml deleted file mode 100644 index 63fee733..00000000 --- a/spec/paths/courses.yaml +++ /dev/null @@ -1,83 +0,0 @@ -get: - summary: List courses - description: Retrieve a list of courses. - tags: - - Courses - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - title - - date_created - - date_updated - - menu_order - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - responses: - 200: - description: Successfully returned a list of courses. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/CourseResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create a course - description: Create a new course object. - tags: - - Courses - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/CourseRequest' - - required: - - title - - content - responses: - 201: - description: Successfully created the course. - content: - application/json: - schema: - $ref: '#/components/schemas/CourseResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/courses@{id}.yaml b/spec/paths/courses@{id}.yaml deleted file mode 100644 index 3e9df5f9..00000000 --- a/spec/paths/courses@{id}.yaml +++ /dev/null @@ -1,98 +0,0 @@ -parameters: - - name: id - in: path - description: Unique Course Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a course - description: Retrieve the details of an existing course. - tags: - - Courses - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/PostPassword' - responses: - 200: - description: Successfully retrieved the course. - content: - application/json: - schema: - $ref: '#/components/schemas/CourseResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a course - description: >- - Update the specified course by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Courses - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CourseRequest' - responses: - 200: - description: Successfully updated the course. - content: - application/json: - schema: - $ref: '#/components/schemas/CourseResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a course - description: Delete an existing course. - tags: - - Courses - requestBody: - content: - application/json: - schema: - type: object - properties: - force: - description: Bypass the trash and force course deletion. - type: boolean - default: false - responses: - 200: - description: Successfully moved the course to the trash. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/CourseResponse' - - type: object - properties: - status: - type: string - default: trash - - 204: - description: Successfully deleted the course. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/courses@{id}@content.yaml b/spec/paths/courses@{id}@content.yaml deleted file mode 100644 index b475dc92..00000000 --- a/spec/paths/courses@{id}@content.yaml +++ /dev/null @@ -1,63 +0,0 @@ -parameters: - - name: id - in: path - description: Unique course Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - - -get: - summary: List course content - description: Retrieve a collection of an existing course's content. - tags: - - Courses - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - order - - id - - title - default: order - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - responses: - 200: - description: Successfully retrieved the course outline. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/courses@{id}@enrollments.yaml b/spec/paths/courses@{id}@enrollments.yaml deleted file mode 100644 index 04a2f843..00000000 --- a/spec/paths/courses@{id}@enrollments.yaml +++ /dev/null @@ -1,71 +0,0 @@ -parameters: - - name: id - in: path - description: Unique course Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - - -get: - summary: List course enrollments - description: Retrieve a collection of an existing course's enrollments. - tags: - - Courses - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for the collection of results. - in: query - schema: - type: string - enum: - - date_updated - - date_created - default: date_updated - - name: status - description: Filter results to records matching the specified status. - in: query - required: false - schema: - $ref: '#/components/schemas/EnrollmentStatus' - - name: student - in: query - description: Limit results to a specific student or a list of students. Accepts a single student `id` or a comma separated list of student `id`s. - schema: - type: string - example: [1,2,3] - responses: - 200: - description: Successfully retrieved the course's enrollments. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Enrollment' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/instructors.yaml b/spec/paths/instructors.yaml deleted file mode 100644 index 691d6c33..00000000 --- a/spec/paths/instructors.yaml +++ /dev/null @@ -1,113 +0,0 @@ -get: - summary: List instructors - description: Retrieves a list of all instructors. - tags: - - Instructors - parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - email - - name - - registered_date - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: post_in - description: | - Retrieve only instructors for the specified course(s) and/or - membership(s). - - Accepts a single WP Post ID or a comma separated list of IDs. - in: query - required: false - schema: - type: string - example: [1,2,3] - - name: post_not_in - description: | - Retrieve only instructors for in the specified course(s) and/or - membership(s). - - Accepts a single WP Post ID or a comma separated list of IDs. - in: query - required: false - schema: - type: string - example: [4,5,6] - - name: roles - description: | - Retrieve instructors by a specific role. - - Accepts a single role name or a comma separated list of role names. - in: query - required: false - schema: - type: string - example: [instructor,lms_manager] - responses: - 200: - description: Successfully returned a list of instructors - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Instructor' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - - -post: - summary: Create an instructor - description: Creates a new instructor object. - tags: - - Instructors - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/Instructor' - - required: - - email - responses: - 201: - description: Successfully created the instructor. - content: - application/json: - schema: - $ref: '#/components/schemas/Instructor' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/instructors@{id}.yaml b/spec/paths/instructors@{id}.yaml deleted file mode 100644 index 9d981bcb..00000000 --- a/spec/paths/instructors@{id}.yaml +++ /dev/null @@ -1,94 +0,0 @@ -parameters: - - name: id - description: Unique Instructor Identifer. The WordPress User `ID`. - example: 123 - in: path - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve an instructor - description: Retrieve the details of an existing instructor. - tags: - - Instructors - parameters: - - $ref: '#/components/parameters/Context' - responses: - 200: - description: Successfully retrieved the instructor. - content: - application/json: - schema: - $ref: '#/components/schemas/Instructor' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update an instructor - description: >- - Update the specified instructor by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Instructors - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Instructor' - responses: - 200: - description: Successfully updated the instructor. - content: - application/json: - schema: - $ref: '#/components/schemas/Instructor' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete an instructor - description: Delete an existing instructor. - tags: - - Instructors - requestBody: - content: - application/json: - schema: - type: object - properties: - reassign: - description: | - ID of a WordPress User. - - Any posts owned by the deleted user will be reassigned to this user. - - LMS content and statuses (enrollments, for example), are not reassigned. - - Default (passing `0` or nothing) delete's the users's content. - type: integer - minimum: 0 - default: 0 - example: 456 - responses: - 204: - description: Successfully deleted the instructor. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/instructors@{id}@content.yaml b/spec/paths/instructors@{id}@content.yaml deleted file mode 100644 index c8e2f3f7..00000000 --- a/spec/paths/instructors@{id}@content.yaml +++ /dev/null @@ -1,74 +0,0 @@ -parameters: - - name: id - description: The instructor's ID. - example: 123 - in: path - required: true - schema: - type: integer - -get: - summary: List an instructor's content - description: Retrieves a list of all the instructor's LMS content. - tags: - - Instructors - parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - email - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: post - description: Retrieve content for a specific list of one or more posts. Accepts a post `id` or comma separted list of post `id`s. - in: query - schema: - type: string - example: 123,456 - - name: post_exclude - description: Exclude content for a specific list of one or more posts. Accepts a post `id` or comma separted list of post `id`s. - in: query - schema: - type: string - example: 789,324 - - $ref: '#/components/parameters/PostType' - responses: - 200: - description: Successfully returned a list of the instructor's content. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - anyOf: - - $ref: '#/components/schemas/CourseResponse' - - $ref: '#/components/schemas/MembershipResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/lesson.yaml b/spec/paths/lesson.yaml deleted file mode 100644 index 95d0aa46..00000000 --- a/spec/paths/lesson.yaml +++ /dev/null @@ -1,92 +0,0 @@ -get: - summary: List lessons - description: Retrieve a list of lessons. - tags: - - Lessons - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - title - - date_created - - date_updated - - order - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: parent - description: Filter lessons by the parent post (section) ID. - in: query - required: false - schema: - type: integer - minimum: 1 - example: 987 - - responses: - 200: - description: Successfully returned a list of lessons. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/LessonResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create a lesson - description: Create a new lesson object. - tags: - - Lessons - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/LessonRequest' - - required: - - title - - content - responses: - 201: - description: Successfully created the lesson. - content: - application/json: - schema: - $ref: '#/components/schemas/LessonResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/lesson@{id}.yaml b/spec/paths/lesson@{id}.yaml deleted file mode 100644 index 99857be0..00000000 --- a/spec/paths/lesson@{id}.yaml +++ /dev/null @@ -1,87 +0,0 @@ -parameters: - - name: id - in: path - description: Unique lesson Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a lesson - description: Retrieve the details of an existing lesson. - tags: - - Lessons - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/PostPassword' - responses: - 200: - description: Successfully retrieved the lesson. - content: - application/json: - schema: - $ref: '#/components/schemas/LessonResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a lesson - description: >- - Update the specified lesson by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Lessons - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LessonRequest' - responses: - 200: - description: Successfully updated the lesson. - content: - application/json: - schema: - $ref: '#/components/schemas/LessonResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a lesson - description: Delete an existing lesson. - tags: - - Lessons - requestBody: - content: - application/json: - schema: - type: object - properties: - force: - description: Bypass the trash and force lesson deletion. - type: boolean - default: false - responses: - 204: - description: Successfully deleted the lesson. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/memberships.yaml b/spec/paths/memberships.yaml deleted file mode 100644 index 66b9c0b0..00000000 --- a/spec/paths/memberships.yaml +++ /dev/null @@ -1,83 +0,0 @@ -get: - summary: List memberships - description: Retrieve a list of memberships. - tags: - - Memberships - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - title - - date_created - - date_updated - - menu_order - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - responses: - 200: - description: Successfully returned a list of memberships. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/MembershipResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create a membership - description: Create a new membership object. - tags: - - Memberships - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/MembershipRequest' - - required: - - title - - content - responses: - 201: - description: Successfully created the membership. - content: - application/json: - schema: - $ref: '#/components/schemas/MembershipResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/memberships@{id}.yaml b/spec/paths/memberships@{id}.yaml deleted file mode 100644 index d1d42cf2..00000000 --- a/spec/paths/memberships@{id}.yaml +++ /dev/null @@ -1,87 +0,0 @@ -parameters: - - name: id - in: path - description: Unique membership Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a membership - description: Retrieve the details of an existing membership. - tags: - - Memberships - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/PostPassword' - responses: - 200: - description: Successfully retrieved the membership. - content: - application/json: - schema: - $ref: '#/components/schemas/MembershipResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a membership - description: >- - Update the specified membership by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Memberships - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/MembershipRequest' - responses: - 200: - description: Successfully updated the membership. - content: - application/json: - schema: - $ref: '#/components/schemas/MembershipResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a membership - description: Delete an existing membership. - tags: - - Memberships - requestBody: - content: - application/json: - schema: - type: object - properties: - force: - description: Bypass the trash and force membership deletion. - type: boolean - default: false - responses: - 204: - description: Successfully deleted the membership. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/memberships@{id}@enrollments.yaml b/spec/paths/memberships@{id}@enrollments.yaml deleted file mode 100644 index 45af64d3..00000000 --- a/spec/paths/memberships@{id}@enrollments.yaml +++ /dev/null @@ -1,72 +0,0 @@ -parameters: - - name: id - in: path - description: Unique membership Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - - -get: - summary: List membership enrollments - description: Retrieve a collection of an existing membership's enrollments. - tags: - - Memberships - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for the collection of results. - in: query - schema: - type: string - enum: - - date_updated - - date_created - default: date_updated - - $ref: '#/components/parameters/Include' - - name: status - description: Filter results to records matching the specified status. - in: query - required: false - schema: - $ref: '#/components/schemas/EnrollmentStatus' - - name: student - in: query - description: Limit results to a specific student or a list of students. Accepts a single student `id` or a comma separated list of student `id`s. - schema: - type: string - example: [1,2,3] - responses: - 200: - description: Successfully retrieved the membership's enrollments. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Enrollment' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/quiz-questions.yaml b/spec/paths/quiz-questions.yaml deleted file mode 100644 index 8fcffb6b..00000000 --- a/spec/paths/quiz-questions.yaml +++ /dev/null @@ -1,139 +0,0 @@ -get: - summary: List quiz questions - description: Retrieve a list of quiz questions. - tags: - - Quiz Questions - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - schema: - type: string - enum: - - id - - title - - date_created - - date_updated - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: quiz - description: Filter quiz questions by the parent post (quiz) ID. - in: query - schema: - type: integer - minimum: 1 - example: 789 - - responses: - 200: - description: Successfully returned a list of quiz questions. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/QuizQuestionTypesResponseList' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create a quiz question - description: Create a new quiz question object. - tags: - - Quiz Questions - requestBody: - required: true - content: - application/json: - schema: - anyOf: - - title: Multiple Choice - allOf: - - required: - - title - - choices - - question_type - - $ref: '#/components/schemas/QuizQuestionTypeChoice' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: Picture Choice - allOf: - - required: - - title - - choices - - question_type - - $ref: '#/components/schemas/QuizQuestionTypePictureChoice' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: True / False - allOf: - - required: - - title - - choices - - question_type - - $ref: '#/components/schemas/QuizQuestionTypeTrueFalse' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: Content - allOf: - - required: - - title - - question_type - - $ref: '#/components/schemas/QuizQuestionTypeContent' - - $ref: '#/components/schemas/QuizQuestionRequest' - - - title: Fill in the Blank - allOf: - - required: - - title - - question_type - - $ref: '#/components/schemas/QuizQuestionTypeBlank' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: Long Answer - allOf: - - required: - - title - - question_type - - $ref: '#/components/schemas/QuizQuestionTypeLongAnswer' - - $ref: '#/components/schemas/QuizQuestionRequest' - - responses: - 201: - description: Successfully created the quiz question. - content: - application/json: - examples: - choice: - summary: Multiple Choice Question - value: {} - long_answer: - summary: Long Answer Question - value: {} - schema: - $ref: '#/components/schemas/QuizQuestionTypesResponseList' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/quiz-questions@{id}.yaml b/spec/paths/quiz-questions@{id}.yaml deleted file mode 100644 index 689d9615..00000000 --- a/spec/paths/quiz-questions@{id}.yaml +++ /dev/null @@ -1,102 +0,0 @@ -parameters: - - name: id - in: path - description: Unique quiz question identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a quiz question - description: Retrieve the details of an existing quiz question. - tags: - - Quiz Questions - parameters: - - $ref: '#/components/parameters/Context' - responses: - 200: - description: Successfully retrieved the quiz question. - content: - application/json: - schema: - $ref: '#/components/schemas/QuizQuestionTypesResponseList' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a quiz question - description: >- - Update the specified quiz question by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Quiz Questions - requestBody: - required: true - content: - application/json: - schema: - anyOf: - - title: Multiple Choice - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeChoice' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: Picture Choice - allOf: - - $ref: '#/components/schemas/QuizQuestionTypePictureChoice' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: True / False - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeTrueFalse' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: Content - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeContent' - - $ref: '#/components/schemas/QuizQuestionRequest' - - - title: Fill in the Blank - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeBlank' - - $ref: '#/components/schemas/QuizQuestionRequest' - - title: Long Answer - allOf: - - $ref: '#/components/schemas/QuizQuestionTypeLongAnswer' - - $ref: '#/components/schemas/QuizQuestionRequest' - - responses: - 200: - description: Successfully updated the quiz question. - content: - application/json: - schema: - $ref: '#/components/schemas/QuizQuestionTypesResponseList' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a quiz question - description: Delete an existing quiz question. - tags: - - Quiz Questions - responses: - 204: - description: Successfully deleted the quiz question. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/quizzes.yaml b/spec/paths/quizzes.yaml deleted file mode 100644 index 111b9c94..00000000 --- a/spec/paths/quizzes.yaml +++ /dev/null @@ -1,104 +0,0 @@ -get: - summary: List quizzes - description: Retrieve a list of quizzes. - tags: - - Quizzes - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - schema: - type: string - enum: - - id - - title - - date_created - - date_updated - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: parent - description: Filter quizzes by the parent post (lesson) ID. - in: query - schema: - type: integer - minimum: 1 - example: 789 - - name: course - description: Filter quizzes by the parent couse ID. - in: query - schema: - type: integer - minimum: 1 - example: 1234 - - name: status - description: Filter quizzes by the post status. - in: query - schema: - type: string - enum: - - publish - - draft - - responses: - 200: - description: Successfully returned a list of quizzes. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/QuizResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create a quiz - description: Create a new quiz object. - tags: - - Quizzes - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/QuizRequest' - - required: - - title - - content - responses: - 201: - description: Successfully created the quiz. - content: - application/json: - schema: - $ref: '#/components/schemas/QuizResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/quizzes@{id}.yaml b/spec/paths/quizzes@{id}.yaml deleted file mode 100644 index e017c711..00000000 --- a/spec/paths/quizzes@{id}.yaml +++ /dev/null @@ -1,76 +0,0 @@ -parameters: - - name: id - in: path - description: Unique Quiz Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a quiz - description: Retrieve the details of an existing quiz. - tags: - - Quizzes - parameters: - - $ref: '#/components/parameters/Context' - responses: - 200: - description: Successfully retrieved the quiz. - content: - application/json: - schema: - $ref: '#/components/schemas/QuizResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a quiz - description: >- - Update the specified quiz by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Quizzes - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/QuizRequest' - responses: - 200: - description: Successfully updated the quiz. - content: - application/json: - schema: - $ref: '#/components/schemas/QuizResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a quiz - description: Delete an existing quiz. - tags: - - Quizzes - responses: - 204: - description: Successfully deleted the quiz. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/sections.yaml b/spec/paths/sections.yaml deleted file mode 100644 index 7f56ab81..00000000 --- a/spec/paths/sections.yaml +++ /dev/null @@ -1,87 +0,0 @@ -get: - summary: List sections - description: Retrieve a list of sections. - tags: - - Sections - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - title - - date_created - - date_updated - - order - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: parent - description: Filter sections by the parent post (course) ID. - in: query - required: false - schema: - type: integer - minimum: 1 - example: 1234 - responses: - 200: - description: Successfully returned a list of sections. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create a section - description: Create a new section object. - tags: - - Sections - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SectionRequest' - responses: - 201: - description: Successfully created the section. - content: - application/json: - schema: - $ref: '#/components/schemas/SectionResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/sections@{id}.yaml b/spec/paths/sections@{id}.yaml deleted file mode 100644 index af93913e..00000000 --- a/spec/paths/sections@{id}.yaml +++ /dev/null @@ -1,74 +0,0 @@ -parameters: - - name: id - in: path - description: Unique Section Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a section - description: Retrieve the details of an existing section. - tags: - - Sections - parameters: - - $ref: '#/components/parameters/Context' - responses: - 200: - description: Successfully retrieved the section. - content: - application/json: - schema: - $ref: '#/components/schemas/SectionResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a section - description: >- - Update the specified section by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Sections - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SectionRequest' - responses: - 200: - description: Successfully updated the section. - content: - application/json: - schema: - $ref: '#/components/schemas/SectionResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a section - description: Delete an existing section. - tags: - - Sections - responses: - 204: - description: Successfully deleted the section. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/sections@{id}@content.yaml b/spec/paths/sections@{id}@content.yaml deleted file mode 100644 index 2c909c99..00000000 --- a/spec/paths/sections@{id}@content.yaml +++ /dev/null @@ -1,69 +0,0 @@ -parameters: - - name: id - in: path - description: Unique section Identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: List section content - description: Retrieve a collection of an existing section's content. - tags: - - Sections - parameters: - - $ref: '#/components/parameters/Context' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - order - - id - - title - default: order - - $ref: '#/components/parameters/Include' - - name: parent - description: Filter results to those belonging to the specified parent. - in: query - required: false - schema: - type: integer - minimum: 1 - example: 987 - responses: - 200: - description: Successfully retrieved the section contents. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/LessonResponse' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/students.yaml b/spec/paths/students.yaml deleted file mode 100644 index 42b57ffa..00000000 --- a/spec/paths/students.yaml +++ /dev/null @@ -1,113 +0,0 @@ -get: - summary: List students - description: Retrieves a list of all students. - tags: - - Students - parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - required: false - schema: - type: string - enum: - - id - - email - - name - - registered_date - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: enrolled_in - description: | - Retrieve only students not enrolled in the specified course(s) and/or - membership(s). - - Accepts a single WP Post ID or a comma separated list of IDs. - in: query - required: false - schema: - type: string - example: [1,2,3] - - name: enrolled_not_in - description: | - Retrieve only students not enrolled in the specified course(s) and/or - membership(s). - - Accepts a single WP Post ID or a comma separated list of IDs. - in: query - required: false - schema: - type: string - example: [4,5,6] - - name: roles - description: | - Retrieve students by a specific role. - - Accepts a single role name or a comma separated list of role names. - in: query - required: false - schema: - type: string - example: [student,customer] - responses: - 200: - description: Successfully returned a list of students - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: | - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Student' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - - -post: - summary: Create a student - description: Creates a new student object. - tags: - - Students - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/Student' - - required: - - email - responses: - 201: - description: Successfully created the student. - content: - application/json: - schema: - $ref: '#/components/schemas/Student' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/students@{id}.yaml b/spec/paths/students@{id}.yaml deleted file mode 100644 index 0e24cd21..00000000 --- a/spec/paths/students@{id}.yaml +++ /dev/null @@ -1,94 +0,0 @@ -parameters: - - name: id - description: Unique student Identifer. The WordPress User `ID`. - example: 123 - in: path - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a student - description: Retrieve the details of an existing student. - tags: - - Students - parameters: - - $ref: '#/components/parameters/Context' - responses: - 200: - description: Successfully retrieved the student. - content: - application/json: - schema: - $ref: '#/components/schemas/Student' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a student - description: >- - Update the specified student by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Students - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Student' - responses: - 200: - description: Successfully updated the student. - content: - application/json: - schema: - $ref: '#/components/schemas/Student' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a student - description: Delete an existing student. - tags: - - Students - requestBody: - content: - application/json: - schema: - type: object - properties: - reassign: - description: | - ID of a WordPress User. - - Any posts owned by the deleted user will be reassigned to this user. - - LMS content and statuses (enrollments, for example), are not reassigned. - - Default (passing `0` or nothing) delete's the users's content. - type: integer - minimum: 0 - default: 0 - example: 456 - responses: - 204: - description: Successfully deleted the student. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/students@{id}@enrollments.yaml b/spec/paths/students@{id}@enrollments.yaml deleted file mode 100644 index a78f824b..00000000 --- a/spec/paths/students@{id}@enrollments.yaml +++ /dev/null @@ -1,70 +0,0 @@ -parameters: - - name: id - description: Unique student Identifer. The WordPress User `ID`. - example: 123 - in: path - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: List student enrollments - description: Retrieves a list of a student's enrollment records. - tags: - - Student Enrollments - parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - schema: - type: string - enum: - - date_updated - - date_created - default: date_updated - - name: status - description: Filter results to records matching the specified status. - in: query - required: false - schema: - $ref: '#/components/schemas/EnrollmentStatus' - - name: post - in: query - description: Limit results to a specific course or membership or a list of courses and/or memberships. Accepts a single post `id` or a comma separated list of post `id`s. - schema: - type: string - example: [1,2,3] - responses: - 200: - description: Successfully returned a list of a student's enrollment records. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Enrollment' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/students@{id}@enrollments@{post_id}.yaml b/spec/paths/students@{id}@enrollments@{post_id}.yaml deleted file mode 100644 index 5586992c..00000000 --- a/spec/paths/students@{id}@enrollments@{post_id}.yaml +++ /dev/null @@ -1,101 +0,0 @@ -parameters: - - name: id - description: Unique student Identifer. The WordPress User `ID`. - example: 123 - in: path - required: true - schema: - $ref: '#/components/schemas/ResourceId' - - name: post_id - description: Unique course, lesson, or section Identifer. The WordPress Post `ID`. - example: 456 - in: path - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Get student enrollment - description: Retrieves information about a student's enrollment in a course or membership. - tags: - - Student Enrollments - responses: - 200: - description: Successfully retrieved student's enrollment. - content: - application/json: - schema: - $ref: '#/components/schemas/Enrollment' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Create student enrollment - description: Create a new enrollment for a student in a course or membership. - tags: - - Student Enrollments - responses: - 201: - description: Successfully created the student's enrollment. - content: - application/json: - schema: - $ref: '#/components/schemas/Enrollment' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -patch: - summary: Update student enrollment - description: Update an enrollment for a student in a course or membership. - tags: - - Student Enrollments - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Enrollment' - responses: - 200: - description: Successfully updated student's enrollment. - content: - application/json: - schema: - $ref: '#/components/schemas/Enrollment' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete student enrollment - description: Deletes the record of a student's enrollment in a course or membership. - tags: - - Student Enrollments - responses: - 204: - description: Successfully deleted student's enrollment. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/spec/paths/students@{id}@progress@{post_id}.yaml b/spec/paths/students@{id}@progress@{post_id}.yaml deleted file mode 100644 index e770a407..00000000 --- a/spec/paths/students@{id}@progress@{post_id}.yaml +++ /dev/null @@ -1,78 +0,0 @@ -parameters: - - name: id - description: Unique student Identifer. The WordPress User `ID`. - example: 123 - in: path - required: true - schema: - $ref: '#/components/schemas/ResourceId' - - name: post_id - description: Unique course, lesson, or section Identifer. The WordPress Post `ID`. - example: 456 - in: path - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Get student progress - description: Retrieves information about a student's progress through course content. - tags: - - Student Progress - responses: - 200: - description: Successfully retrieved student's progress. - content: - application/json: - schema: - $ref: '#/components/schemas/Progress' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update student progress - description: Update the status of a student's progress through course content. - tags: - - Student Progress - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Progress' - responses: - 200: - description: Successfully updated student's progress. - content: - application/json: - schema: - $ref: '#/components/schemas/Progress' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete student progress - description: Deletes the record of a student's progress through course content. - tags: - - Student Progress - responses: - 204: - description: Successfully deleted the student. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/webhooks.yaml b/spec/paths/webhooks.yaml deleted file mode 100644 index 58cd5a49..00000000 --- a/spec/paths/webhooks.yaml +++ /dev/null @@ -1,89 +0,0 @@ -get: - summary: List webhooks - description: Retrieve a list of webhooks. - tags: - - Webhooks - parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/Order' - - name: orderby - description: Specify the sort field for a collection of results. - in: query - schema: - type: string - enum: - - id - - name - - date_created - - date_updated - default: id - - $ref: '#/components/parameters/Include' - - $ref: '#/components/parameters/Exclude' - - name: status - description: Filter results to those matching a specific status. - in: query - schema: - type: string - enum: - - active - - paused - - disabled - responses: - 200: - description: Successfully returned a list of webhooks. - headers: - Link: - description: Pagination links for the collection. - schema: - type: string - example: >- - ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - X-WP-Total: - $ref: '#/components/headers/PaginationTotalResults' - X-WP-TotalPages: - $ref: '#/components/headers/PaginationTotalPages' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Webhook' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - -post: - summary: Create a webhook - description: Create a new webhook object. - tags: - - Webhooks - requestBody: - required: true - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/Webhook' - - required: - - topic - - url - responses: - 201: - description: Successfully created the webhook. - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' diff --git a/spec/paths/webhooks@{id}.yaml b/spec/paths/webhooks@{id}.yaml deleted file mode 100644 index 9b6479fa..00000000 --- a/spec/paths/webhooks@{id}.yaml +++ /dev/null @@ -1,74 +0,0 @@ -parameters: - - name: id - in: path - description: Unique webhook identifier. The WordPress Post `ID`. - required: true - schema: - $ref: '#/components/schemas/ResourceId' - -get: - summary: Retrieve a webhook - description: Retrieve the details of an existing webhook. - tags: - - Webhooks - responses: - 200: - description: Successfully retrieved the webhook. - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -post: - summary: Update a webhook - description: >- - Update the specified webhook by setting the values of the parameters passed. - Any parameters not provided will be left unchanged. - tags: - - Webhooks - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - responses: - 200: - description: Successfully updated the webhook. - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' - -delete: - summary: Delete a webhook - description: Delete an existing webhook. - tags: - - Webhooks - responses: - 204: - description: Successfully deleted the webhook. - 400: - $ref: '#/components/responses/Error400' - 401: - $ref: '#/components/responses/Error401' - 403: - $ref: '#/components/responses/Error403' - 404: - $ref: '#/components/responses/Error404' diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 56160618..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,53 +0,0 @@ -keys()->create( array( - 'description' => 'Test Key', - 'user_id' => $user_id ? $user_id : $this->factory->user->create(), - 'permissions' => $permissions, - ) ); - - if ( $authorize ) { - $this->mock_authorization( $key->get( 'consumer_key_one_time' ), $key->get( 'consumer_secret' ) ); - } - - return $key; - - } - - /** - * Create multiple API Keys - * - * @since 1.0.0-beta.1 - * - * @param int $count Number of keys to create. - * @param string $permissions Define permissions for the keys. If not specified assigns a random permission to each key. - * @param int $user WP_User Id to assign the key to. If not supplied uses the user factory to create a new admin user for each created key. - * @return void - */ - protected function create_many_api_keys( $count, $permissions = 'rand', $user = null ) { - - $pems_available = array_keys( LLMS_REST_API()->keys()->get_permissions() ); - $num_pems = count( $pems_available ) - 1; - - $i = 1; - while ( $i <= $count ) { - - $pem = 'rand' === $permissions ? $pems_available[ rand( 0, $num_pems ) ] : $permissions; - $uid = $user ? $user : $this->factory->user->create( array( 'role' => 'administrator' ) ); - - $this->get_mock_api_key( $pem, $uid, false ); - $i++; - } - - } - - public function create_many_webhooks( $count, $status = 'rand', $topic = 'rand' ) { - - $statuses = array_keys( LLMS_REST_API()->webhooks()->get_statuses() ); - $num_statuses = count( $statuses ) - 1; - - $topics = array_keys( LLMS_REST_API()->webhooks()->get_topics() ); - $num_topics = count( $topics ) - 2; // don't use the custom "action" topic. - - $i = 1; - while ( $i <= $count ) { - - $args = array( - 'status' => 'rand' === $status ? $statuses[ rand( 0, $num_statuses ) ] : $status, - 'topic' => 'rand' === $topic ? $topics[ rand( 0, $num_topics ) ] : $topic, - 'delivery_url' => 'https://mock.tld', - ); - - LLMS_REST_API()->webhooks()->create( $args ); - $i++; - - } - - } - - /** - * Mock authorization headers. - * - * @since 1.0.0-beta.1 - * - * @param string $key Consumer key. - * @param string $secret Consumer secret. - * @return void - */ - protected function mock_authorization( $key = null, $secret = null ) { - - $_SERVER['HTTP_X_LLMS_CONSUMER_KEY'] = $key; - $_SERVER['HTTP_X_LLMS_CONSUMER_SECRET'] = $secret; - } - - /** - * test teardown. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function tearDown() { - - parent::tearDown(); - - // Remove possibly mocked headers. - unset( $_SERVER['HTTP_X_LLMS_CONSUMER_KEY'], $_SERVER['HTTP_X_LLMS_CONSUMER_SECRET'] ); - - } - -} diff --git a/tests/framework/class-llms-rest-unit-test-case-posts.php b/tests/framework/class-llms-rest-unit-test-case-posts.php deleted file mode 100644 index 03b3a3a0..00000000 --- a/tests/framework/class-llms-rest-unit-test-case-posts.php +++ /dev/null @@ -1,97 +0,0 @@ -get( 'id' ) ); - - $expected = array( - 'id' => $llms_post->get( 'id' ), - 'title' => array( - 'raw' => $llms_post->get( 'title', 'raw' ), - 'rendered' => $llms_post->get( 'title' ), - ), - 'status' => $llms_post->get( 'status' ), - 'content' => array( - 'raw' => $llms_post->get( 'content', 'raw' ), - 'rendered' => $password_required ? '' : apply_filters( 'the_content', $llms_post->get( 'content', 'raw' ) ), - ), - 'excerpt' => array( - 'raw' => $llms_post->get( 'excerpt', 'raw' ), - 'rendered' => $password_required ? '' : apply_filters( 'the_excerpt', $llms_post->get( 'content', 'raw' ) ), - ), - 'date_created' => $llms_post->get( 'date', 'Y-m-d H:i:s' ), - 'date_created_gmt' => $llms_post->get( 'date_gmt', 'Y-m-d H:i:s' ), - 'date_updated' => $llms_post->get( 'modified', 'Y-m-d H:i:s' ), - 'date_updated_gmt' => $llms_post->get( 'modified_gmt', 'Y-m-d H:i:s' ), - ); - - if ( 'edit' !== $context ) { - unset( - $expected['content']['raw'], - $expected['excerpt']['raw'], - $expected['title']['raw'] - ); - } - - $expected = $this->filter_expected_fields( $expected, $llms_post ); - - /** - * The rtrim below is not ideal but at the moment we have templates printed after the course summary (e.g. prerequisites) that, - * even when printing no data they still print "\n". Let's pretend we're not interested in testing the trailing "\n" presence. - */ - foreach ( $expected as $key => $value ) { - if ( ! isset( $llms_post_data[ $key ] ) ) { - continue; - } - if ( is_array( $value ) ) { - foreach ( $value as $k => $v ) { - if ( 'content' === $key ) { - if ( ! isset( $llms_post_data[ $key ][ $k ] ) ) { - continue; - } - $this->assertEquals( rtrim( $v, "\n" ), rtrim( $llms_post_data[ $key ][ $k ], "\n" ) ); - } - } - } else { - if ( 'content' === $key ) { - $this->assertEquals( rtrim( $value, "\n" ), rtrim( $llms_post_data[ $key ], "\n" ) ); - } - } - } - - } - - protected function filter_expected_fields( $expected, $llms_post ) { - return $expected; - } - -} diff --git a/tests/framework/class-llms-rest-unit-test-case-server.php b/tests/framework/class-llms-rest-unit-test-case-server.php deleted file mode 100644 index dd12eda2..00000000 --- a/tests/framework/class-llms-rest-unit-test-case-server.php +++ /dev/null @@ -1,148 +0,0 @@ -server = rest_get_server(); - - } - - /** - * Assert a WP_REST_Response code equals an expected code. - * - * @since 1.0.0-beta.1 - * - * @param string $expected Expected response code. - * @param WP_REST_Response $response Response object. - * @return void - */ - protected function assertResponseCodeEquals( $expected, WP_REST_Response $response ) { - - $data = $response->get_data(); - $this->assertEquals( $expected, $data['code'] ); - - } - - /** - * Assert a WP_REST_Response message equals an expected message. - * - * @since 1.0.0-beta.1 - * - * @param int $expected Expected response message. - * @param WP_REST_Response $response Response object. - * @return void - */ - protected function assertResponseMessageEquals( $expected, WP_REST_Response $response ) { - - $data = $response->get_data(); - $this->assertEquals( $expected, $data['message'] ); - - } - - /** - * Assert a WP_REST_Response status code equals an expected status code. - * - * @since 1.0.0-beta.1 - * - * @param int $expected Expected response http status code. - * @param WP_REST_Response $response Response object. - * @return void - */ - protected function assertResponseStatusEquals( $expected, WP_REST_Response $response ) { - - $this->assertEquals( $expected, $response->get_status() ); - - } - - /** - * Parse the `Link` header to pull all links into an associative array of rel => uri - * - * @since 1.0.0-beta.1 - * - * @param WP_REST_Response $response Response object. - * @return array - */ - protected function parse_link_headers( WP_REST_Response $response ) { - - $headers = $response->get_headers(); - $links = isset( $headers['Link'] ) ? $headers['Link'] : ''; - - $parsed = array(); - if ( $links ) { - - foreach ( explode( ',', $links ) as $link ) { - preg_match( '/<(.*)>; rel="(.*)"/i', trim( $link, ',' ), $match ); - if ( 3 === count( $match ) ) { - $parsed[ $match[2] ] = $match[1]; - } - } - - } - - return $parsed; - - } - - /** - * Preform a mock WP_REST_Request - * - * @since 1.0.0-beta.1 - * - * @param string $method Request method. - * @param string $route Request route, eg: '/llms/v1/courses'. - * @param array $body Optional request body. - * @param array $query Optional query arguments. - * @return WP_REST_Response. - */ - protected function perform_mock_request( $method, $route, $body = array(), $query = array() ) { - - $request = new WP_REST_Request( $method, $route ); - if ( $body ) { - $request->set_body_params( $body ); - } - if( $query ) { - $request->set_query_params( $query ); - } - return $this->server->dispatch( $request ); - - } - - /** - * Unset the server. - * - * @since 1.0.0-beta.1 - */ - public function tearDown() { - - parent::tearDown(); - - global $wp_rest_server; - unset( $this->server ); - - $wp_rest_server = null; - - } - -} diff --git a/tests/unit-tests/admin/class-llms-rest-test-admin-form-controller.php b/tests/unit-tests/admin/class-llms-rest-test-admin-form-controller.php deleted file mode 100644 index c76bb3e9..00000000 --- a/tests/unit-tests/admin/class-llms-rest-test-admin-form-controller.php +++ /dev/null @@ -1,465 +0,0 @@ -includes(); - include_once LLMS_PLUGIN_DIR . 'includes/admin/class.llms.admin.notices.php'; - - $this->obj = new LLMS_REST_Admin_Form_Controller(); - - } - - /** - * Clean up admin notices between tests - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function tearDown() { - - parent::tearDown(); - foreach( LLMS_Admin_Notices::get_notices() as $id ) { - LLMS_Admin_Notices::delete_notice( $id ); - } - - global $wpdb; - $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}lifterlms_webhooks" ); - - } - - /** - * Test no events are run on regular admin screens. - * - * @since 1.0.0-beta.1 - * - * @see {Reference} - * @link {URL} - * - * @return [type] - */ - public function test_handle_events_no_submit() { - - $this->assertFalse( $this->obj->handle_events() ); - - } - - /** - * Ensure required field errors are returned when creating a webhook. - * - * @since 1.0.0-beta.1 - * - * @return [type] - */ - public function test_create_webhook_required_fields() { - - $data = array( - 'llms_rest_webhook_nonce' => wp_create_nonce( 'create-update-webhook' ), - ); - - // Missing topic required field. - $this->mockPostRequest( $data ); - $ret = $this->obj->handle_events(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_missing_topic', $ret ); - - // Missing delivery url. - $data['llms_rest_webhook_topic'] = 'course.created'; - $this->mockPostRequest( $data ); - $ret = $this->obj->handle_events(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_missing_delivery_url', $ret ); - - // Success. - // redirect and exit back to webooks's edit page. - $data['llms_rest_webhook_delivery_url'] = 'https://mock.tld'; - $this->mockPostRequest( $data ); - $this->expectException( LLMS_Unit_Test_Exception_Redirect::class ); - $this->expectExceptionMessage( 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=webhooks&edit-webhook=1 [301] YES' ); - - try { - $this->obj->handle_events(); - } catch ( LLMS_Unit_Test_Exception_Redirect $exception ) { - - $hook = LLMS_REST_API()->webhooks()->get( 1 ); - - $this->assertEquals( 'https://mock.tld', $hook->get( 'delivery_url' ) ); - $this->assertEquals( 'course.created', $hook->get( 'topic' ) ); - $this->assertEquals( 'disabled', $hook->get( 'status' ) ); - $this->assertEquals( 50, strlen( $hook->get( 'secret' ) ) ); - $this->assertEquals( 0, strpos( $hook->get( 'secret' ), 'Webhook created on ' ) ); - - throw $exception; - - } - - } - - /** - * Ensure all submittable fields are added to the hook on creation. - * - * @since 1.0.0-beta.1 - * - * @return [type] - */ - public function test_create_webhook_all_fields() { - - $data = array( - 'llms_rest_webhook_nonce' => wp_create_nonce( 'create-update-webhook' ), - 'llms_rest_webhook_name' => 'Webhook Name', - 'llms_rest_webhook_topic' => 'course.created', - 'llms_rest_webhook_secret' => 'myawesomesecret', - 'llms_rest_webhook_delivery_url' => 'https://mock.tld', - 'llms_rest_webhook_status' => 'active', - ); - - $this->mockPostRequest( $data ); - $this->expectException( LLMS_Unit_Test_Exception_Redirect::class ); - $this->expectExceptionMessage( 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=webhooks&edit-webhook=1 [301] YES' ); - - try { - $this->obj->handle_events(); - } catch ( LLMS_Unit_Test_Exception_Redirect $exception ) { - - $hook = LLMS_REST_API()->webhooks()->get( 1 ); - - $this->assertEquals( $data['llms_rest_webhook_name'], $hook->get( 'name' ) ); - $this->assertEquals( $data['llms_rest_webhook_topic'], $hook->get( 'topic' ) ); - $this->assertEquals( $data['llms_rest_webhook_secret'], $hook->get( 'secret' ) ); - $this->assertEquals( $data['llms_rest_webhook_delivery_url'], $hook->get( 'delivery_url' ) ); - $this->assertEquals( $data['llms_rest_webhook_status'], $hook->get( 'status' ) ); - - throw $exception; - - } - - } - - /** - * Test creating a webhook with a custom action. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_webhook_custom_action() { - - $data = array( - 'llms_rest_webhook_nonce' => wp_create_nonce( 'create-update-webhook' ), - 'llms_rest_webhook_name' => 'Webhook Name', - 'llms_rest_webhook_topic' => 'action', - 'llms_rest_webhook_secret' => 'myawesomesecret', - 'llms_rest_webhook_delivery_url' => 'https://mock.tld', - 'llms_rest_webhook_status' => 'active', - ); - - $this->mockPostRequest( $data ); - $ret = $this->obj->handle_events(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_topic', $ret ); - - $data['llms_rest_webhook_action'] = 'mock'; - $this->mockPostRequest( $data ); - - $this->expectException( LLMS_Unit_Test_Exception_Redirect::class ); - $this->expectExceptionMessage( 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=webhooks&edit-webhook=1 [301] YES' ); - - try { - $this->obj->handle_events(); - } catch ( LLMS_Unit_Test_Exception_Redirect $exception ) { - - $hook = LLMS_REST_API()->webhooks()->get( 1 ); - - $this->assertEquals( 'action.mock', $hook->get( 'topic' ) ); - - throw $exception; - - } - - } - - /** - * Test upserting a webhook with weird or invalid ids. - * - * @since 1.0.0-beta.1 - * - * @see {Reference} - * @link {URL} - * - * @return [type] - */ - public function test_upsert_webhook_weird_ids() { - - $data = array( - 'llms_rest_webhook_nonce' => wp_create_nonce( 'create-update-webhook' ), - ); - - $tests = array( - 'llms_rest_api_webhook_not_found' => array( 999, '999', ), // Will preform a lookup for numeric values. - 'llms_rest_webhook_missing_topic' => array( 0, '0', 'string', false, null, '', ' ' ), // Will attempt to create. - ); - foreach ( $tests as $code => $ids ) { - - foreach ( $ids as $id ) { - - $data['llms_rest_webhook_id'] = $id; - $this->mockPostRequest( $data ); - - $ret = $this->obj->handle_events(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( $code, $ret ); - - } - - } - - } - - public function test_update_webhook_required_fields() { - - $hook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.com', - 'topic' => 'course.created', - ) ); - - // Can't nullify delivery url. - $this->mockPostRequest( array( - 'llms_rest_webhook_nonce' => wp_create_nonce( 'create-update-webhook' ), - 'llms_rest_webhook_id' => $hook->get( 'id' ), - 'llms_rest_webhook_delivery_url' => '', - ) ); - $ret = $this->obj->handle_events(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_delivery_url', $ret ); - - } - - public function test_update_webhook() { - - $hook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.com', - 'topic' => 'course.created', - ) ); - - $data = array( - 'llms_rest_webhook_nonce' => wp_create_nonce( 'create-update-webhook' ), - 'llms_rest_webhook_id' => $hook->get( 'id' ), - - 'llms_rest_webhook_name' => 'Webhook Name', - 'llms_rest_webhook_topic' => 'course.created', - 'llms_rest_webhook_secret' => 'myawesomesecret', - 'llms_rest_webhook_delivery_url' => 'https://mock.tld', - 'llms_rest_webhook_status' => 'active', - ); - - $this->mockPostRequest( $data ); - - $this->assertTrue( $this->obj->handle_events() ); - - $hook = LLMS_REST_API()->webhooks()->get( $hook->get( 'id' ) ); - - $this->assertEquals( $data['llms_rest_webhook_name'], $hook->get( 'name' ) ); - $this->assertEquals( $data['llms_rest_webhook_topic'], $hook->get( 'topic' ) ); - $this->assertEquals( $data['llms_rest_webhook_secret'], $hook->get( 'secret' ) ); - $this->assertEquals( $data['llms_rest_webhook_delivery_url'], $hook->get( 'delivery_url' ) ); - $this->assertEquals( $data['llms_rest_webhook_status'], $hook->get( 'status' ) ); - - } - - /** - * Test updating a webhook with a custom action. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_webhook_custom_action() { - - $hook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.com', - 'topic' => 'course.created', - ) ); - - $data = array( - 'llms_rest_webhook_nonce' => wp_create_nonce( 'create-update-webhook' ), - 'llms_rest_webhook_id' => $hook->get( 'id' ), - - 'llms_rest_webhook_topic' => 'action', - ); - - $this->mockPostRequest( $data ); - $ret = $this->obj->handle_events(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_topic', $ret ); - - $data['llms_rest_webhook_action'] = 'mock'; - $this->mockPostRequest( $data ); - - $this->obj->handle_events(); - - $hook = LLMS_REST_API()->webhooks()->get( $hook->get( 'id' ) ); - - $this->assertEquals( 'action.mock', $hook->get( 'topic' ) ); - - } - - /** - * Test the "Revoke" nonce URL for deleting api keys. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_revoke_key() { - - // Key id but no nonce. - $this->mockGetRequest( array( - 'revoke-key' => 9324234, - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Nonce present but no key. - $this->mockGetRequest( array( - 'key-revoke-nonce' => wp_create_nonce( 'revoke' ), - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Nonce & key but key is fake. - $this->mockGetRequest( array( - 'revoke-key' => 9324234, - 'key-revoke-nonce' => wp_create_nonce( 'revoke' ), - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Nonce is fake. - $this->mockGetRequest( array( - 'revoke-key' => 9324234, - 'key-revoke-nonce' => 'arstarstarst', - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Real key and real nonce. - $key = LLMS_REST_API()->keys()->create( array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ) ); - $this->mockGetRequest( array( - 'revoke-key' => $key->get( 'id' ), - 'key-revoke-nonce' => wp_create_nonce( 'revoke' ), - ) ); - - // redirect and exit back to the keys list. - $this->expectException( LLMS_Unit_Test_Exception_Redirect::class ); - $this->expectExceptionMessage( 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=keys [302] YES' ); - - try { - - $this->obj->handle_events(); - - } catch ( LLMS_Unit_Test_Exception_Redirect $exception ) { - - // Key will no longer exist. - $this->assertFalse( LLMS_REST_API()->keys()->get( $key->get( 'id' ) ) ); - - // Should have an admin notice. - $notices = LLMS_Admin_Notices::get_notices(); - $this->assertEquals( 1, count( $notices ) ); - $this->assertEquals( 'The API Key has been successfully deleted.', LLMS_Admin_Notices::get_notice( $notices[0] )['html'] ); - - throw $exception; - } - - } - - /** - * Test the delete nonce URL for deleting webhooks. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_delete_webhook() { - - // Key id but no nonce. - $this->mockGetRequest( array( - 'delete-webhook' => 9324234, - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Nonce present but no key. - $this->mockGetRequest( array( - 'delete-webhook-nonce' => wp_create_nonce( 'delete' ), - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Nonce & key but key is fake. - $this->mockGetRequest( array( - 'delete-webhook' => 9324234, - 'delete-webhook-nonce' => wp_create_nonce( 'delete' ), - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Nonce is fake. - $this->mockGetRequest( array( - 'delete-webhook' => 9324234, - 'delete-webhook-nonce' => 'arstarstarst', - ) ); - $this->assertFalse( $this->obj->handle_events() ); - - // Real webhook and real nonce. - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.tld', - ) ); - $this->mockGetRequest( array( - 'delete-webhook' => $webhook->get( 'id' ), - 'delete-webhook-nonce' => wp_create_nonce( 'delete' ), - ) ); - - // redirect and exit back to the webhooks list. - $this->expectException( LLMS_Unit_Test_Exception_Redirect::class ); - $this->expectExceptionMessage( 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=webhooks [302] YES' ); - - try { - - $this->obj->handle_events(); - - } catch ( LLMS_Unit_Test_Exception_Redirect $exception ) { - - // Key will no longer exist. - $this->assertFalse( LLMS_REST_API()->webhooks()->get( $webhook->get( 'id' ) ) ); - - // Should have an admin notice. - $notices = LLMS_Admin_Notices::get_notices(); - $this->assertEquals( 1, count( $notices ) ); - $this->assertEquals( 'The webhook has been successfully deleted.', LLMS_Admin_Notices::get_notice( $notices[0] )['html'] ); - - throw $exception; - } - - } - -} diff --git a/tests/unit-tests/admin/class-llms-rest-test-admin-settings-page.php b/tests/unit-tests/admin/class-llms-rest-test-admin-settings-page.php deleted file mode 100644 index fe29356b..00000000 --- a/tests/unit-tests/admin/class-llms-rest-test-admin-settings-page.php +++ /dev/null @@ -1,106 +0,0 @@ -includes(); - include_once LLMS_PLUGIN_DIR . 'includes/admin/class.llms.admin.notices.php'; - include_once LLMS_REST_API_PLUGIN_DIR . 'includes/admin/class-llms-rest-admin-settings-page.php'; - $this->page = new LLMS_REST_Admin_Settings_Page(); - - $this->user = $this->factory->user->create( array( 'role' => 'administrator' ) ); - - } - - /** - * Tear down the test case. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function tearDown() { - parent::tearDown(); - } - - /** - * test hooks are added from the constructor - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_hooks() { - - $this->assertEquals( 20, has_filter( 'lifterlms_settings_tabs_array', array( $this->page, 'add_settings_page' ) ) ); - $this->assertEquals( 10, has_action( 'lifterlms_sections_rest-api', array( $this->page, 'output_sections_nav' ) ) ); - $this->assertEquals( 10, has_action( 'lifterlms_settings_rest-api', array( $this->page, 'output' ) ) ); - - $this->assertEquals( 10, has_action( 'lifterlms_settings_save_rest-api', array( 'LLMS_Rest_Admin_Settings_API_Keys', 'save' ) ) ); - - $this->assertEquals( 10, has_filter( 'llms_settings_rest-api_has_save_button', '__return_false' ) ); - $this->assertEquals( 10, has_filter( 'llms_table_get_table_classes', array( $this->page, 'get_table_classes' ) ) ); - - $this->assertEquals( 10, has_action( 'lifterlms_admin_field_title-with-html', array( $this->page, 'output_title_field' ) ) ); - - } - - /** - * Test get_current_section() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_current_section() { - - // Default with no permissions. - $this->assertEquals( 'main', LLMS_Unit_Test_Util::call_method( $this->page, 'get_current_section' ) ); - - // Default with permissions. - wp_set_current_user( $this->user ); - $this->assertEquals( 'keys', LLMS_Unit_Test_Util::call_method( $this->page, 'get_current_section' ) ); - - } - - /** - * Test get_sections() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_sections() { - - // None without permissions. - $this->assertEquals( array(), $this->page->get_sections() ); - - // With permissions. - wp_set_current_user( $this->user ); - $this->assertEquals( array( 'keys', 'webhooks' ), array_keys( $this->page->get_sections() ) ); - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-api-key.php b/tests/unit-tests/class-llms-rest-test-api-key.php deleted file mode 100644 index 94249cd0..00000000 --- a/tests/unit-tests/class-llms-rest-test-api-key.php +++ /dev/null @@ -1,114 +0,0 @@ -keys()->create( array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ) ); - - $this->assertEquals( - 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=keys&edit-key=' . $key->get( 'id' ), - $key->get_edit_link() - ); - - } - - /** - * Test the get_delete_link() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_delete_link() { - - $key = LLMS_REST_API()->keys()->create( array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ) ); - - $link = $key->get_delete_link(); - - $this->assertEquals( 0, strpos( 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=keys&revoke-key=' . $key->get( 'id' ), $key->get_delete_link() ) ); - parse_str( wp_parse_url( $link, PHP_URL_QUERY ), $parts ); - $this->assertTrue( array_key_exists( 'key-revoke-nonce', $parts ) ); - - } - - /** - * Test has_permissions() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_has_permission() { - - $key = $this->get_mock_api_key( 'read' ); - $tests = array( - 'HEAD' => true, - 'GET' => true, - 'POST' => false, - 'PUT' => false, - 'PATCH' => false, - 'DELETE' => false, - 'OPTIONS' => true, - 'FAKE' => false, - ); - foreach ( $tests as $method => $expect ) { - $this->assertEquals( $expect, $key->has_permission( $method ), $method ); - } - - $key = $this->get_mock_api_key( 'write' ); - $tests = array( - 'HEAD' => false, - 'GET' => false, - 'POST' => true, - 'PUT' => true, - 'PATCH' => true, - 'DELETE' => true, - 'OPTIONS' => true, - 'FAKE' => false, - ); - foreach ( $tests as $method => $expect ) { - $this->assertEquals( $expect, $key->has_permission( $method ), $method ); - } - - $key = $this->get_mock_api_key( 'read_write' ); - $tests = array( - 'HEAD' => true, - 'GET' => true, - 'POST' => true, - 'PUT' => true, - 'PATCH' => true, - 'DELETE' => true, - 'OPTIONS' => true, - 'FAKE' => false, - ); - foreach ( $tests as $method => $expect ) { - $this->assertEquals( $expect, $key->has_permission( $method ), $method ); - } - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-api-keys-query.php b/tests/unit-tests/class-llms-rest-test-api-keys-query.php deleted file mode 100644 index 56e2b9ab..00000000 --- a/tests/unit-tests/class-llms-rest-test-api-keys-query.php +++ /dev/null @@ -1,259 +0,0 @@ -query( "TRUNCATE TABLE {$wpdb->prefix}lifterlms_api_keys" ); - - } - - /** - * Test the get_keys() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_keys() { - - $query = new LLMS_REST_API_Keys_Query(); - $this->assertEquals( array(), $query->get_keys() ); - - $this->create_many_api_keys( 3 ); - - foreach ( array( true, false ) as $with_filters ) { - - $query = new LLMS_REST_API_Keys_Query( array( 'suppress_filters' => $with_filters ) ); - $keys = $query->get_keys(); - foreach ( $keys as $key ) { - $this->assertTrue( is_a( $key, 'LLMS_REST_API_Key' ) ); - } - - } - - - } - - /** - * Test the include and exclude arguments. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_include_and_exclude() { - - $this->create_many_api_keys( 5 ); - $query = new LLMS_REST_API_Keys_Query( array() ); - $ids = range( 1, 5 ); - - $this->create_many_api_keys( 5 ); - - $query = new LLMS_REST_API_Keys_Query( array( - 'include' => $ids, - ) ); - $this->assertEquals( 5, $query->found_results ); - $this->assertEquals( $ids, wp_list_pluck( $query->get_results(), 'id' ) ); - - $query = new LLMS_REST_API_Keys_Query( array( - 'exclude' => $ids, - ) ); - $this->assertEquals( 5, $query->found_results ); - $this->assertEquals( range( 6, 10 ), wp_list_pluck( $query->get_results(), 'id' ) ); - - } - - /** - * Test pagination of query results. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_pagination() { - - $this->create_many_api_keys( 25 ); - - $query = new LLMS_REST_API_Keys_Query( array() ); - $this->assertEquals( 10, count( $query->get_results() ) ); - $this->assertEquals( 25, $query->found_results ); - $this->assertEquals( 3, $query->max_pages ); - $this->assertEquals( range( 1, 10 ), wp_list_pluck( $query->get_results(), 'id' ) ); - $this->assertTrue( $query->is_first_page() ); - - $query = new LLMS_REST_API_Keys_Query( array( 'page' => 2 ) ); - $this->assertEquals( range( 11, 20 ), wp_list_pluck( $query->get_results(), 'id' ) ); - - $query = new LLMS_REST_API_Keys_Query( array( 'page' => 3 ) ); - $this->assertEquals( range( 21, 25 ), wp_list_pluck( $query->get_results(), 'id' ) ); - $this->assertTrue( $query->is_last_page() ); - - } - - /** - * Test the permissions arguments. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_permissions() { - - $this->create_many_api_keys( 5, 'read' ); - $this->create_many_api_keys( 5, 'read_write' ); - $this->create_many_api_keys( 5, 'write' ); - - $query = new LLMS_REST_API_Keys_Query( array() ); - $this->assertEquals( 15, $query->found_results ); - - foreach ( array_keys( LLMS_REST_API()->keys()->get_permissions() ) as $pem ) { - - $query = new LLMS_REST_API_Keys_Query( array( 'permissions' => $pem ) ); - $this->assertEquals( 5, $query->found_results ); - - } - - } - - /** - * Test setting up default query args. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_setup_with_defaults() { - - $query = new LLMS_REST_API_Keys_Query(); - - $args = array( - 'include' => array(), - 'exclude' => array(), - 'permissions' => '', - 'user' => array(), - 'user_not_in' => array(), - 'page' => 1, - 'per_page' => 10, - 'sort' => array( - 'id' => 'ASC' - ), - ); - - foreach ( $args as $arg => $expect ) { - $this->assertEquals( $expect, $query->get( $arg ), $arg ); - } - - } - - /** - * Tests setting up all possible arguments with custom arguments. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_setup_with_custom() { - - $args = array( - 'include' => array( 1, 2, 3 ), - 'exclude' => array( 4, 5, 6 ), - 'permissions' => 'read', - 'user' => array( 3 ), - 'user_not_in' => array( 234, 432 ), - 'page' => 5, - 'per_page' => 500, - 'sort' => array( - 'description' => 'ASC', - 'id' => 'DESC', - ), - ); - - $query = new LLMS_REST_API_Keys_Query( $args ); - - foreach ( $args as $arg => $expect ) { - $this->assertEquals( $expect, $query->get( $arg ), $arg ); - } - - } - - /** - * Merge default with custom arguments on setup. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_setup_with_merge() { - - $args = array( - 'include' => array( 1, 2, 3 ), - 'exclude' => array( 4, 5, 6 ), - 'sort' => array( - 'description' => 'ASC', - 'id' => 'DESC', - ), - ); - - $query = new LLMS_REST_API_Keys_Query( $args ); - - $args['page'] = 1; - $args['per_page'] = 10; - $args['permissions'] = ''; - $args['user'] = array(); - $args['user_not_in'] = array(); - - foreach ( $args as $arg => $expect ) { - $this->assertEquals( $expect, $query->get( $arg ), $arg ); - } - - } - - /** - * Test the users include and exclude arguments. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_users_in_and_not_in() { - - $uid = $this->factory->user->create(); - - $this->create_many_api_keys( 5 ); - $this->create_many_api_keys( 5, 'read', $uid ); - - $query = new LLMS_REST_API_Keys_Query( array( - 'user' => $uid, - ) ); - $res_1 = wp_list_pluck( $query->get_results(), 'id' ); - $this->assertEquals( 5, $query->found_results ); - - $query = new LLMS_REST_API_Keys_Query( array( - 'user_not_in' => $uid, - ) ); - $res_2 = wp_list_pluck( $query->get_results(), 'id' ); - $this->assertEquals( 5, $query->found_results ); - $this->assertTrue( $res_1 !== $res_2 ); - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-api-keys.php b/tests/unit-tests/class-llms-rest-test-api-keys.php deleted file mode 100644 index e591ae10..00000000 --- a/tests/unit-tests/class-llms-rest-test-api-keys.php +++ /dev/null @@ -1,312 +0,0 @@ -keys = LLMS_REST_API()->keys(); - - } - - /** - * Test all potential errors encountered during API Key creation. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_errors() { - - // Can't create when an ID is supplied. - $ret = $this->keys->create( array( - 'id' => 1, - ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_exists', $ret ); - - $data = array(); - - // No description. - $ret = $this->keys->create( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_missing_description', $ret ); - - $data['description'] = 'Mock key description'; - - // No user_ids. - foreach( array( '0', 0, '' ) as $uid ) { - $data['user_id'] = $uid; - $ret = $this->keys->create( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_missing_user_id', $ret ); - } - - // Invalid user_id. - $data['user_id'] = 92349234; - $ret = $this->keys->create( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_invalid_user_id', $ret ); - - $data['user_id'] = $this->factory->user->create(); - - // Invalid permissions. - $data['permissions'] = 'fake'; - $ret = $this->keys->create( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_invalid_permissions', $ret ); - - } - - /** - * Test the success of the create() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_success() { - - $expected_actions = did_action( 'llms_rest_api_key_created' ) + 1; - - // Use default permissions. - $data = array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ); - $ret = $this->keys->create( $data ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_api_key_created' ) ); - $this->assertTrue( is_a( $ret, 'LLMS_REST_API_Key' ) ); - $this->assertTrue( $ret->exists() ); - $this->assertTrue( ! empty( $ret->get( 'consumer_key_one_time' ) ) ); - $this->assertEquals( llms_rest_api_hash( $ret->get( 'consumer_key_one_time' ) ), $ret->get( 'consumer_key' ) ); - $this->assertEquals( 'read', $ret->get( 'permissions' ) ); - $this->assertEquals( substr( $ret->get( 'consumer_key_one_time' ), -7 ), $ret->get( 'truncated_key' ) ); - $this->assertEquals( $data['description'], $ret->get( 'description' ) ); - $this->assertEquals( $data['user_id'], $ret->get( 'user_id' ) ); - $this->assertTrue( 0 === strpos( $ret->get( 'consumer_secret' ), 'cs_' ) ); - - // Create a key for each valid permission. - foreach ( array_keys( $this->keys->get_permissions() ) as $permission ) { - - $expected_actions++; - - $data = array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - 'permissions' => $permission, - ); - $ret = $this->keys->create( $data ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_api_key_created' ) ); - $this->assertTrue( is_a( $ret, 'LLMS_REST_API_Key' ) ); - $this->assertTrue( $ret->exists() ); - $this->assertTrue( ! empty( $ret->get( 'consumer_key_one_time' ) ) ); - $this->assertEquals( llms_rest_api_hash( $ret->get( 'consumer_key_one_time' ) ), $ret->get( 'consumer_key' ) ); - $this->assertEquals( $permission, $ret->get( 'permissions' ) ); - $this->assertEquals( substr( $ret->get( 'consumer_key_one_time' ), -7 ), $ret->get( 'truncated_key' ) ); - $this->assertEquals( $data['description'], $ret->get( 'description' ) ); - $this->assertEquals( $data['user_id'], $ret->get( 'user_id' ) ); - $this->assertTrue( 0 === strpos( $ret->get( 'consumer_secret' ), 'cs_' ) ); - - } - - } - - /** - * Test the delete() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_delete() { - - $expected_actions = did_action( 'llms_rest_api_key_deleted' ) + 1; - - // Invalid key. - $this->assertFalse( $this->keys->delete( 99993423423 ) ); - - // Create a mock key to work with. - $orig = $this->keys->create( array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ) ); - - // Returns true. - $this->assertTrue( $this->keys->delete( $orig->get( 'id' ) ) ); - - // Action was run. - $this->assertEquals( $expected_actions, did_action( 'llms_rest_api_key_deleted' ) ); - - // Can't find via new get. - $this->assertFalse( $this->keys->get( $orig->get( 'id' ) ) ); - - } - - /** - * Test the get() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get() { - - // Invalid Key. - $this->assertFalse( $this->keys->get( 99993423423 ) ); - - // Create a mock key to work with. - $orig = $this->keys->create( array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ) ); - - // Key exists. - $ret = $this->keys->get( $orig->get( 'id' ) ); - $this->assertTrue( is_a( $ret, 'LLMS_REST_API_Key' ) ); - $this->assertEquals( $orig->get( 'consumer_key' ), $ret->get( 'consumer_key' ) ); - $this->assertEquals( $orig->get( 'consumer_secret' ), $ret->get( 'consumer_secret' ) ); - $this->assertEquals( llms_rest_api_hash( $orig->get( 'consumer_key_one_time' ) ), $ret->get( 'consumer_key' ) ); - - } - - /** - * Test the `get_admin_url()` method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_admin_url() { - - $this->assertEquals( 'http://example.org/wp-admin/admin.php?page=llms-settings&tab=rest-api§ion=keys', $this->keys->get_admin_url() ); - - } - - /** - * Test the get_permissions() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_permissions() { - - $permissions = $this->keys->get_permissions(); - $this->assertEquals( array( 'read', 'write', 'read_write' ), array_keys( $permissions ) ); - $this->assertEquals( array( 'Read', 'Write', 'Read / Write' ), array_values( $permissions ) ); - - } - - /** - * Test update() error conditions. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_errors() { - - // No ID. - $ret = $this->keys->update( array() ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_missing_id', $ret ); - - - // Invalid Key. - $ret = $this->keys->update( array( - 'id' => 99993423423, - ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_invalid_key', $ret ); - - // Create a mock key to work with. - $orig = $this->keys->create( array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ) ); - - $data = array( - 'id' => $orig->get( 'id' ), - ); - - // Empty and invalid user ids. - foreach( array( '', 0, '0', 92349234 ) as $uid ) { - // Invalid user_id. - $data['user_id'] = $uid; - $ret = $this->keys->update( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_invalid_user_id', $ret ); - } - - $data['user_id'] = $this->factory->user->create(); - - // Invalid description. - $data['description'] = ''; - $ret = $this->keys->update( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_invalid_description', $ret ); - - $data['description'] = 'Okay description'; - - // Invalid permissions. - $data['permissions'] = 'fake'; - $ret = $this->keys->update( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_key_invalid_permissions', $ret ); - - } - - /** - * Test update() method success. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_success() { - - // Create a mock key to work with. - $orig = $this->keys->create( array( - 'description' => 'Test Key', - 'user_id' => $this->factory->user->create(), - ) ); - - // New data. - $data = array( - 'id' => $orig->get( 'id' ), - 'description' => 'Update key description', - 'user_id' => $this->factory->user->create(), - 'permissions' => 'read_write', - 'last_access' => current_time( 'mysql' ), - ); - $ret = $this->keys->update( $data ); - $this->assertTrue( is_a( $ret, 'LLMS_REST_API_Key' ) ); - $this->assertEquals( $data['description'], $ret->get( 'description' ) ); - $this->assertEquals( $data['user_id'], $ret->get( 'user_id' ) ); - $this->assertEquals( $data['permissions'], $ret->get( 'permissions' ) ); - $this->assertEquals( $data['last_access'], $ret->get( 'last_access' ) ); - - // Don't allow write-protected keys to be updated. - $data = array_merge( array( - 'consumer_key' => 'ast', - 'consumer_secret' => 'ast', - 'truncated_key' => 'ast', - ), $data ); - $ret = $this->keys->update( $data ); - $this->assertEquals( $orig->get( 'consumer_key' ), $ret->get( 'consumer_key' ) ); - $this->assertEquals( $orig->get( 'consumer_secret' ), $ret->get( 'consumer_secret' ) ); - $this->assertEquals( $orig->get( 'truncated_key' ), $ret->get( 'truncated_key' ) ); - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-authentication.php b/tests/unit-tests/class-llms-rest-test-authentication.php deleted file mode 100644 index 21f7739f..00000000 --- a/tests/unit-tests/class-llms-rest-test-authentication.php +++ /dev/null @@ -1,210 +0,0 @@ -auth = new LLMS_REST_Authentication(); - - } - - /** - * Test the authenticate method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_authenticate() { - - $expected_actions = did_action( 'llms_rest_basic_auth_success' ); - - // An already authenticated user. - $this->assertEquals( 123, $this->auth->authenticate( 123 ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - - // No SSL. - $this->assertEquals( false, $this->auth->authenticate( false ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - - $_SERVER['HTTPS'] = 'ON'; - - $this->assertEquals( false, $this->auth->authenticate( false ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - - // Not an LLMS Request. - $_SERVER['REQUEST_URI'] = 'https://example.org/wp-json/wp/v1/mock'; - - $this->assertEquals( false, $this->auth->authenticate( false ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - - $_SERVER['REQUEST_URI'] = 'https://example.org/wp-json/llms/v1/mock'; - - // No credentials. - $this->assertEquals( false, $this->auth->authenticate( false ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - - // Success. - $key = $this->get_mock_api_key(); - $expected_actions++; - $this->assertEquals( $key->get( 'user_id' ), $this->auth->authenticate( false ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - - // Correct key, incorrect secret. - $_SERVER['HTTP_X_LLMS_CONSUMER_SECRET'] = 'fakesecret'; - $this->assertEquals( false, $this->auth->authenticate( false ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - $this->assertTrue( is_wp_error( LLMS_Unit_Test_Util::call_method( $this->auth, 'get_error' ) ) ); - - // Incorrect key. - $_SERVER['HTTP_X_LLMS_CONSUMER_KEY'] = 'fakekey'; - $this->assertEquals( false, $this->auth->authenticate( false ) ); - $this->assertEquals( $expected_actions, did_action( 'llms_rest_basic_auth_success' ) ); - - } - - /** - * Test key lookup. - * - * @since 1.0.0-beta.1 - * - * @return [type] - */ - public function test_find_key() { - - // No keys to find. - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'find_key', array( 'ck_fake' ) ) ); - - $keys = array(); - $i = 0; - while ( $i < 3 ) { - - $keys[] = LLMS_REST_API()->keys()->create( array( - 'description' => 'Test Key ' . $i, - 'user_id' => $this->factory->user->create(), - ) ); - - // Fake key. - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'find_key', array( 'ck_fake' ) ) ); - - // Find the key - $found = LLMS_Unit_Test_Util::call_method( $this->auth, 'find_key', array( $keys[ $i ]->get( 'consumer_key_one_time' ) ) ); - $this->assertEquals( $keys[ $i ]->get( 'id' ), $found->get( 'id' ) ); - - $i++; - - } - - } - - /** - * Test the get_credentials() method using headers. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_credentials_from_headers() { - - $expect = array( - 'key' => 'mock_key', - 'secret' => 'mock_secret', - ); - - // No key or secret. - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'HTTP_X_LLMS_CONSUMER_KEY', 'HTTP_X_LLMS_CONSUMER_SECRET' ) ) ); - - // Key, no secret. - $_SERVER['HTTP_X_LLMS_CONSUMER_KEY'] = $expect['key']; - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'HTTP_X_LLMS_CONSUMER_KEY', 'HTTP_X_LLMS_CONSUMER_SECRET' ) ) ); - - // Secret, no key. - unset( $_SERVER['HTTP_X_LLMS_CONSUMER_KEY'] ); - $_SERVER['HTTP_X_LLMS_CONSUMER_SECRET'] = $expect['secret']; - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'HTTP_X_LLMS_CONSUMER_KEY', 'HTTP_X_LLMS_CONSUMER_SECRET' ) ) ); - - // Key & Secret - $_SERVER['HTTP_X_LLMS_CONSUMER_KEY'] = $expect['key']; - $this->assertEquals( $expect, LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'HTTP_X_LLMS_CONSUMER_KEY', 'HTTP_X_LLMS_CONSUMER_SECRET' ) ) ); - - unset( $_SERVER['HTTP_X_LLMS_CONSUMER_KEY'], $_SERVER['HTTP_X_LLMS_CONSUMER_SECRET'] ); - - } - - /** - * Test the get_credentials() method using basic auth. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_credentials_from_auth() { - - $expect = array( - 'key' => 'mock_key', - 'secret' => 'mock_secret', - ); - - // No key or secret. - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'PHP_AUTH_USER', 'PHP_AUTH_PW' ) ) ); - - // Key, no secret. - $_SERVER['PHP_AUTH_USER'] = $expect['key']; - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'PHP_AUTH_USER', 'PHP_AUTH_PW' ) ) ); - - // Secret, no key. - unset( $_SERVER['PHP_AUTH_USER'] ); - $_SERVER['PHP_AUTH_PW'] = $expect['secret']; - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'PHP_AUTH_USER', 'PHP_AUTH_PW' ) ) ); - - // Key & Secret - $_SERVER['PHP_AUTH_USER'] = $expect['key']; - $this->assertEquals( $expect, LLMS_Unit_Test_Util::call_method( $this->auth, 'locate_credentials', array( 'PHP_AUTH_USER', 'PHP_AUTH_PW' ) ) ); - - unset( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] ); - - } - - /** - * Test the is_rest_request() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_rest_request() { - - $tests = array( - '' => false, - 'http://example.com/wp-json/wp/v1/mock' => false, - 'https://example.com/wp-json/mock/v1/mock' => false, - - 'https://example.org/wp-json/llms/v1/mock' => true, - 'https://example.com/wp-json/llms/v1/mock' => true, - 'https://example.com/wp-json/llms/v2/mock' => true, - 'http://example.com/wp-json/llms/v1/mock' => true, - 'http://example.com/wp-json/llms-external/v1/mock' => true, - ); - - foreach ( $tests as $uri => $expect ) { - - $_SERVER['REQUEST_URI'] = $uri; - $this->assertEquals( $expect, LLMS_Unit_Test_Util::call_method( $this->auth, 'is_rest_request' ) ); - - } - - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-capabilities.php b/tests/unit-tests/class-llms-rest-test-capabilities.php deleted file mode 100644 index 6fab5c07..00000000 --- a/tests/unit-tests/class-llms-rest-test-capabilities.php +++ /dev/null @@ -1,61 +0,0 @@ -assertEquals( array( - 'manage_lifterlms_api_keys' => true, - 'manage_lifterlms_webhooks' => true, - ), LLMS_REST_Capabilities::add( array() ) ); - $this->assertEquals( array( - 'some_other_cap' => true, - 'manage_lifterlms_api_keys' => true, - 'manage_lifterlms_webhooks' => true, - ), LLMS_REST_Capabilities::add( array( 'some_other_cap' => true ) ) ); - - } - - /** - * Test various user types to ensure they have the proper capabilities. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_user_capabilites_integration() { - - $admin = $this->factory->user->create( array( 'role' => 'administrator' ) ); - $manager = $this->factory->user->create( array( 'role' => 'lms_manager' ) ); - $student = $this->factory->student->create(); - $subscriber = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - $this->assertTrue( user_can( $admin, 'manage_lifterlms_api_keys' ) ); - $this->assertTrue( user_can( $manager, 'manage_lifterlms_api_keys' ) ); - $this->assertFalse( user_can( $student, 'manage_lifterlms_api_keys' ) ); - $this->assertFalse( user_can( $subscriber, 'manage_lifterlms_api_keys' ) ); - - $this->assertTrue( user_can( $admin, 'manage_lifterlms_webhooks' ) ); - $this->assertTrue( user_can( $manager, 'manage_lifterlms_webhooks' ) ); - $this->assertFalse( user_can( $student, 'manage_lifterlms_webhooks' ) ); - $this->assertFalse( user_can( $subscriber, 'manage_lifterlms_webhooks' ) ); - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-functions.php b/tests/unit-tests/class-llms-rest-test-functions.php deleted file mode 100644 index 527f32ee..00000000 --- a/tests/unit-tests/class-llms-rest-test-functions.php +++ /dev/null @@ -1,66 +0,0 @@ -assertTrue( is_string( $hash ) ); - $this->assertEquals( 64, strlen( $hash ) ); - - $hash = llms_rest_api_hash( 'abc' ); - $this->assertTrue( is_string( $hash ) ); - $this->assertEquals( 64, strlen( $hash ) ); - - $hash = llms_rest_api_hash( llms_rest_random_hash() ); - $this->assertTrue( is_string( $hash ) ); - $this->assertEquals( 64, strlen( $hash ) ); - - } - - /** - * Test the llms_rest_get_api_endpoint_data() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_llms_rest_get_api_endpoint_data() { - - $res = llms_rest_get_api_endpoint_data( '/llms/v1' ); - $this->assertEquals( 'llms/v1', $res['namespace'] ); - - } - - /** - * Test the llms_rest_random_hash() function - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_llms_rest_random_hash() { - - $hash = llms_rest_random_hash(); - $this->assertTrue( is_string( $hash ) ); - $this->assertEquals( 40, strlen( $hash ) ); - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-install.php b/tests/unit-tests/class-llms-rest-test-install.php deleted file mode 100644 index 75089d82..00000000 --- a/tests/unit-tests/class-llms-rest-test-install.php +++ /dev/null @@ -1,127 +0,0 @@ -assertEquals( $actions, did_action( 'llms_rest_updated' ) ); - - // Should run if version is not equal to current version. - update_option( 'llms_rest_version', '0.0.1-alpha.1' ); - LLMS_REST_Install::check_version(); - $actions++; - $this->assertEquals( $actions, did_action( 'llms_rest_updated' ) ); - - // Shouldn't run b/c versions are equal - LLMS_REST_Install::check_version(); - update_option( 'llms_rest_version', LLMS_REST_API()->version ); - $this->assertEquals( $actions, did_action( 'llms_rest_updated' ) ); - - // Shouldn't run b/c iframe request. - define( 'IFRAME_REQUEST', true ); - LLMS_REST_Install::check_version(); - $this->assertEquals( $actions, did_action( 'llms_rest_updated' ) ); - - } - - /** - * Test the LLMS_REST_Install::get_schema() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_schema() { - - global $wpdb; - - $collate = ''; - if ( $wpdb->has_cap( 'collation' ) ) { - if ( ! empty( $wpdb->charset ) ) { - $collate .= "DEFAULT CHARACTER SET $wpdb->charset"; - } - if ( ! empty( $wpdb->collate ) ) { - $collate .= " COLLATE $wpdb->collate"; - } - } - - $default = "CREATE TABLE `{$wpdb->prefix}lifterlms_fake_table` ( -`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT -) $collate;"; - - $schema = LLMS_REST_Install::get_schema( $default, $collate ); - $this->assertTrue( is_string( $schema ) ); - $this->assertTrue( 0 === strpos( $schema, $default ) ); - $this->assertTrue( false !== strpos( $schema, "CREATE TABLE `{$wpdb->prefix}lifterlms_api_keys`" ) ); - $this->assertTrue( false !== strpos( $schema, "CREATE TABLE `{$wpdb->prefix}lifterlms_webhooks`" ) ); - - } - - /** - * Test the install method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_install() { - - // clean existing install first. - if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { - define( 'WP_UNINSTALL_PLUGIN', true ); - define( 'LLMS_REMOVE_ALL_DATA', true ); - } - include dirname( dirname( dirname( __FILE__ ) ) ) . '/uninstall.php'; - - LLMS_REST_Install::install(); - $this->assertEquals( get_option( 'llms_rest_version' ), LLMS_REST_API()->version ); - - global $wpdb; - $this->assertEquals( $wpdb->prefix . 'lifterlms_api_keys', $wpdb->get_var( "SHOW TABLES LIKE '%lifterlms_api_keys'" ) ); - $this->assertEquals( $wpdb->prefix . 'lifterlms_webhooks', $wpdb->get_var( "SHOW TABLES LIKE '%lifterlms_webhooks'" ) ); - - } - - /** - * Test the update_version() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_version() { - - LLMS_REST_Install::update_version( '1' ); - $this->assertEquals( '1', get_option( 'llms_rest_version' ) ); - - LLMS_REST_Install::update_version(); - $this->assertEquals( LLMS_REST_API()->version, get_option( 'llms_rest_version' ) ); - - LLMS_REST_Install::update_version( '1.2.3' ); - $this->assertEquals( '1.2.3', get_option( 'llms_rest_version' ) ); - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-main.php b/tests/unit-tests/class-llms-rest-test-main.php deleted file mode 100644 index 719fbc86..00000000 --- a/tests/unit-tests/class-llms-rest-test-main.php +++ /dev/null @@ -1,55 +0,0 @@ -main = LLMS_REST_API(); - - } - - /** - * Test keys() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_keys() { - - $this->assertTrue( is_a( $this->main->keys(), 'LLMS_REST_API_Keys' ) ); - - } - - - /** - * Test webhooks() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_webhooks() { - - $this->assertTrue( is_a( $this->main->webhooks(), 'LLMS_REST_Webhooks' ) ); - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-webhook-delivery.php b/tests/unit-tests/class-llms-rest-test-webhook-delivery.php deleted file mode 100644 index 0d8e1868..00000000 --- a/tests/unit-tests/class-llms-rest-test-webhook-delivery.php +++ /dev/null @@ -1,172 +0,0 @@ -assertEquals( 200, wp_remote_retrieve_response_code( $res ) ); - $this->assertEquals( $this->hook->get( 'id' ), $webhook->get( 'id' ) ); - $this->res = compact( 'http_args', 'res', 'duration', 'args', 'webhook', 'body' ); - - } - - private function setup_hook( $topic ) { - - $this->hook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => $this->endpoint, - 'topic' => $topic, - 'status' => 'active', - ) ); - $this->hook->enqueue(); - - } - - /** - * Setup the test case. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function setUp() { - parent::setUp(); - add_filter( 'llms_rest_webhook_deliver_async', '__return_false' ); - add_action( 'llms_rest_webhook_delivery', array( $this, 'watch_for_delivery' ), 10, 5 ); - } - - /** - * Tear down the test case. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function tearDown() { - - parent::tearDown(); - remove_filter( 'llms_rest_webhook_deliver_async', '__return_false' ); - remove_action( 'llms_rest_webhook_delivery', array( $this, 'watch_for_delivery' ), 10 ); - global $wpdb; - $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}lifterlms_webhooks" ); - - } - - /* - /$$$$$$ - /$$__ $$ - | $$ \__/ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ - | $$ /$$__ $$| $$ | $$ /$$__ $$ /$$_____/ /$$__ $$ /$$_____/ - | $$ | $$ \ $$| $$ | $$| $$ \__/| $$$$$$ | $$$$$$$$| $$$$$$ - | $$ $$| $$ | $$| $$ | $$| $$ \____ $$| $$_____/ \____ $$ - | $$$$$$/| $$$$$$/| $$$$$$/| $$ /$$$$$$$/| $$$$$$$ /$$$$$$$/ - \______/ \______/ \______/ |__/ |_______/ \_______/|_______/ - */ - public function test_deliver_course_created() { - - $this->setup_hook( 'course.created' ); - $id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - $this->assertEquals( $id, $this->res['body']['id'] ); - - } - - public function test_deliver_course_updated() { - - $this->setup_hook( 'course.updated' ); - $id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - wp_update_post( array( - 'ID' => $id, - 'post_title' => 'New Title', - ) ); - $this->assertEquals( $id, $this->res['body']['id'] ); - $this->assertEquals( 'New Title', $this->res['body']['title']['rendered'] ); - - } - - public function test_deliver_course_deleted() { - - $this->setup_hook( 'course.deleted' ); - $id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - wp_trash_post( $id ); - $this->assertEquals( $id, $this->res['body']['id'] ); - - } - - public function test_deliver_course_deleted_force() { - - $this->setup_hook( 'course.deleted' ); - $id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - wp_delete_post( $id, true ); - $this->assertEquals( $id, $this->res['body']['id'] ); - - } - - public function test_deliver_course_restored() { - - $this->setup_hook( 'course.restored' ); - $id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - wp_trash_post( $id ); - wp_untrash_post( $id ); - $this->assertEquals( $id, $this->res['body']['id'] ); - - } - - /* - /$$$$$$ /$$ /$$ - /$$__ $$ | $$ |__/ - | $$ \__/ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$ - | $$$$$$ /$$__ $$ /$$_____/|_ $$_/ | $$ /$$__ $$| $$__ $$ /$$_____/ - \____ $$| $$$$$$$$| $$ | $$ | $$| $$ \ $$| $$ \ $$| $$$$$$ - /$$ \ $$| $$_____/| $$ | $$ /$$| $$| $$ | $$| $$ | $$ \____ $$ - | $$$$$$/| $$$$$$$| $$$$$$$ | $$$$/| $$| $$$$$$/| $$ | $$ /$$$$$$$/ - \______/ \_______/ \_______/ \___/ |__/ \______/ |__/ |__/|_______/ - */ - public function test_deliver_section_created() { - - $this->setup_hook( 'section.created' ); - $id = $this->factory->post->create( array( 'post_type' => 'section' ) ); - $this->assertEquals( $id, $this->res['body']['id'] ); - - } - - public function test_deliver_section_updated() { - - $this->setup_hook( 'section.updated' ); - $id = $this->factory->post->create( array( 'post_type' => 'section' ) ); - wp_update_post( array( - 'ID' => $id, - 'post_title' => 'New Title', - ) ); - $this->assertEquals( $id, $this->res['body']['id'] ); - $this->assertEquals( 'New Title', $this->res['body']['title']['rendered'] ); - - } - - public function test_deliver_section_deleted() { - - $this->setup_hook( 'section.deleted' ); - $id = $this->factory->post->create( array( 'post_type' => 'section' ) ); - wp_trash_post( $id ); - $this->assertEquals( $id, $this->res['body']['id'] ); - - } - - - -} diff --git a/tests/unit-tests/class-llms-rest-test-webhook.php b/tests/unit-tests/class-llms-rest-test-webhook.php deleted file mode 100644 index 81932b71..00000000 --- a/tests/unit-tests/class-llms-rest-test-webhook.php +++ /dev/null @@ -1,702 +0,0 @@ - array( - 'code' => 400, - 'message' => 'Bad Request', - ), - ); - - } elseif ( 'https://mock.tld/200' === $url ) { - - return array( - 'response' => array( - 'code' => 200, - 'message' => 'Success', - ), - ); - - } - - return $ret; - - } - - /** - * Setup the test case. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function setUp() { - parent::setUp(); - } - - /** - * Tear down the test case. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function tearDown() { - parent::tearDown(); - - add_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - remove_filter( 'pre_http_request', array( $this, 'mock_request' ), 10 ); - - } - - public function test_delivery_errors() { - - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld/400', - 'topic' => 'course.created', - 'status' => 'active', - 'user_id' => $this->factory->user->create( array( 'role' => 'administrator' ) ), - ) ); - - add_filter( 'pre_http_request', array( $this, 'mock_request' ), 10, 3 ); - - $webhook->deliver( array( $course ) ); - - $this->assertEquals( 1, $webhook->get( 'failure_count' ) ); - - $webhook = $webhook->set( 'failure_count', 5 ); - - $webhook->deliver( array( $course ) ); - - $this->assertEquals( 6, $webhook->get( 'failure_count' ) ); - $this->assertEquals( 'disabled', $webhook->get( 'status' ) ); - - } - - - public function test_delivery_success() { - - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld/200', - 'topic' => 'course.created', - 'status' => 'active', - 'user_id' => $this->factory->user->create( array( 'role' => 'administrator' ) ), - ) ); - - $webhook->set( 'pending_delivery', 1 ); - $webhook->set( 'failure_count', 3 ); - - add_filter( 'pre_http_request', array( $this, 'mock_request' ), 10, 3 ); - - $webhook->deliver( array( $course ) ); - - $this->assertEquals( 0, $webhook->get( 'pending_delivery' ) ); - $this->assertEquals( 0, $webhook->get( 'failure_count' ) ); - - } - - /** - * Test enqueue for an action with a single hook. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_enqueue_single_hook() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'course.created', - ) ); - - $this->assertFalse( has_action( 'save_post_course', array( $webhook, 'process_hook' ) ) ); - $webhook->enqueue(); - $this->assertEquals( 10, has_action( 'save_post_course', array( $webhook, 'process_hook' ) ) ); - - } - - /** - * Test enqueue for an action with a multiple hooks. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_enqueue_multi_hooks() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'enrollment.created', - ) ); - - $this->assertFalse( has_action( 'llms_user_course_enrollment_created', array( $webhook, 'process_hook' ) ) ); - $this->assertFalse( has_action( 'llms_user_membership_enrollment_created', array( $webhook, 'process_hook' ) ) ); - $webhook->enqueue(); - $this->assertEquals( 10, has_action( 'llms_user_course_enrollment_created', array( $webhook, 'process_hook' ) ) ); - $this->assertEquals( 10, has_action( 'llms_user_membership_enrollment_created', array( $webhook, 'process_hook' ) ) ); - - } - - /** - * Test enqueue for a custom action - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_enqueue_custom_action() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'action.mock_hook', - ) ); - - $this->assertFalse( has_action( 'mock_hook', array( $webhook, 'process_hook' ) ) ); - $webhook->enqueue(); - $this->assertEquals( 10, has_action( 'mock_hook', array( $webhook, 'process_hook' ) ) ); - - } - - /** - * Test the get_edit_link() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_edit_link() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'course.created', - ) ); - - $this->assertEquals( - admin_url( 'admin.php?page=llms-settings&tab=rest-api§ion=webhooks&edit-webhook=' . $webhook->get( 'id' ) ), - $webhook->get_edit_link() - ); - - } - - /** - * Test the get_delete_link() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_delete_link() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'course.created', - ) ); - - $link = $webhook->get_delete_link(); - - $this->assertEquals( 0, strpos( admin_url( 'admin.php?page=llms-settings&tab=rest-api§ion=webhooks&revoke-webhook=' . $webhook->get( 'id' ) ), $webhook->get_delete_link() ) ); - parse_str( wp_parse_url( $link, PHP_URL_QUERY ), $parts ); - $this->assertTrue( array_key_exists( 'delete-webhook-nonce', $parts ) ); - - } - - /** - * Test signature generation. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_delivery_signature() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'course.created', - ) ); - - $expected_ts = time(); - llms_tests_mock_current_time( time() ); - $expected_payload = wp_json_encode( array( 'mock' => 'test' ) ); - - $sig = $webhook->get_delivery_signature( $expected_payload ); - llms_tests_reset_current_time(); - - // Make sure the string looks right. - $this->assertEquals( 0, strpos( $sig, 't=' ) ); - $this->assertEquals( 12, strpos( $sig, ',v1=' ) ); - - // Parse the string and run some checks. - $parsed = array(); - $items = explode( ',', $sig ); - foreach ( $items as $item ) { - $item_parts = explode( '=', $item ); - $parsed[ $item_parts[0] ] = $item_parts[1]; - } - - $this->assertEquals( $expected_ts, $parsed['t'] ); - $this->assertArrayHasKey( 'v1', $parsed ); - - // recreate the signature and compare. - $hash = hash_hmac( 'sha256', $expected_ts . '.' . $expected_payload, $webhook->get( 'secret' ) ); - $this->assertEquals( $hash, $parsed['v1'] ); - - } - - /** - * Test event getter. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_event() { - - $tests = array( - 'course.created' => 'created', - 'course.updated' => 'updated', - 'progress.updated' => 'updated', - 'student.deleted' => 'deleted', - 'action.mock' => 'mock', - 'action.fake' => 'fake', - ); - - foreach ( $tests as $topic => $event ) { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => $topic, - ) ); - - $this->assertEquals( $event, $webhook->get_event() ); - - } - - } - - - /** - * test hook getter. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_hooks() { - - foreach ( LLMS_REST_API()->webhooks()->get_hooks() as $topic => $hooks ) { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => $topic, - ) ); - - $this->assertEquals( $hooks, $webhook->get_hooks() ); - - } - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'action.mock', - ) ); - - $this->assertEquals( array( 'mock' => 1 ), $webhook->get_hooks() ); - - } - - /** - * Test resource getter. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_resource() { - - $tests = array( - 'course.created' => 'course', - 'access_plan.updated' => 'access_plan', - 'progress.updated' => 'progress', - 'student.deleted' => 'student', - 'action.mock' => 'action', - 'action.fake' => 'action', - ); - - foreach ( $tests as $topic => $resource ) { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => $topic, - ) ); - - $this->assertEquals( $resource, $webhook->get_resource() ); - - } - - } - - /** - * Test is pending checker method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_pending() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://fake.tld', - 'topic' => 'course.created', - ) ); - - $this->assertFalse( $webhook->is_pending() ); - - $webhook->set( 'pending_delivery', 1 ); - - $this->assertTrue( $webhook->is_pending() ); - } - - /** - * Test validity of post actions. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_valid_post_action() { - - $post_types = array( - 'course' => false, - 'section' => false, - 'lesson' => false, - 'llms_membership' => false, - 'llms_access_plan' => false, - 'llms_order' => false, - 'llms_transaction' => false, - 'post' => false, - 'page' => false, - ); - - $tests = array( - 'course.deleted' => array_merge( $post_types, array( 'course' => true ) ), - 'section.deleted' => array_merge( $post_types, array( 'section' => true ) ), - 'lesson.deleted' => array_merge( $post_types, array( 'lesson' => true ) ), - 'membership.deleted' => array_merge( $post_types, array( 'llms_membership' => true ) ), - 'access_plan.deleted' => array_merge( $post_types, array( 'llms_access_plan' => true ) ), - 'order.deleted' => array_merge( $post_types, array( 'llms_order' => true ) ), - 'transaction.deleted' => array_merge( $post_types, array( 'llms_transaction' => true ) ), - ); - - foreach ( $tests as $topic => $post_types ) { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://fake.tld', - 'topic' => $topic, - ) ); - - foreach ( $post_types as $type => $expect ) { - - $post_id = $this->factory->post->create( array( 'post_type' => $type ) ); - $this->assertEquals( $expect, LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_post_action', array( $post_id ) ) ); - - } - - } - - } - - public function test_is_valid_resource() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://fake.tld', - 'topic' => 'course.created', - ) ); - - $course = $this->factory->post->create_and_get( array( 'post_type' => 'course' ) ); - - global $wp_current_filter; - $wp_current_filter = array( 'save_post_course' ); - $this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course, false ) ) ) ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course, true ) ) ) ); - $wp_current_filter = array(); - - // it's a draft. - $course->post_status = 'auto-draft'; - wp_update_post( $course ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course, false ) ) ) ); - - } - - public function test_is_valid_user_action() { - - $student = $this->factory->student->create(); - $admin = $this->factory->user->create( array( 'role' => 'administrator' ) ); - $instructor = $this->factory->user->create( array( 'role' => 'instructor' ) ); - $subscriber = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - $fake = $subscriber + 1; - - // Student topics. - $topics = array( - 'student.created', - 'student.updated', - 'student.deleted', - ); - - foreach ( $topics as $topic ) { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://fake.tld', - 'topic' => $topic, - ) ); - - $this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $student ) ) ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $admin ) ) ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $instructor ) ) ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $subscriber ) ) ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $fake ) ) ); - - } - - // Instructor topics. - $topics = array( - 'instructor.created', - 'instructor.updated', - 'instructor.deleted', - ); - - foreach ( $topics as $topic ) { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://fake.tld', - 'topic' => $topic, - ) ); - - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $student ) ) ); - $this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $admin ) ) ); - $this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $instructor ) ) ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $subscriber ) ) ); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_user_action', array( $fake ) ) ); - - } - - } - - public function test_scheduling_student_created() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'student.created', - 'status' => 'active', - ) ); - - $webhook->enqueue(); - - $schedule_args = array( - 'webhook_id' => $webhook->get( 'id' ), - 'args' => array( $this->factory->student->create() ), - ); - - $this->assertTrue( false !== as_next_scheduled_action( 'lifterlms_rest_deliver_webhook_async', $schedule_args, 'llms-webhooks' ) ); - - } - - public function test_scheduling_enrollment_created() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'enrollment.created', - 'status' => 'active', - ) ); - - $webhook->enqueue(); - - $student = $this->factory->student->create(); - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - - $schedule_args = array( - 'webhook_id' => $webhook->get( 'id' ), - 'args' => array( $student, $course ), - ); - - llms_enroll_student( $student, $course ); - - $this->assertTrue( false !== as_next_scheduled_action( 'lifterlms_rest_deliver_webhook_async', $schedule_args, 'llms-webhooks' ) ); - - } - - /** - * Test ping() on unresolveable urls. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_ping_unreachable() { - - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://fake.tld', - 'topic' => 'course.created', - ) ); - - remove_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - - $ret = $webhook->ping(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_unreachable', $ret ); - - } - - /** - * Test ping() on non 200 responses. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_ping_non_200_status() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld/400', - 'topic' => 'course.created', - ) ); - - add_filter( 'pre_http_request', array( $this, 'mock_request' ), 10, 3 ); - remove_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - - $ret = $webhook->ping(); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_not_200', $ret ); - - } - - /** - * Test ping() success. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_ping_success() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld/200', - 'topic' => 'course.created', - ) ); - - add_filter( 'pre_http_request', array( $this, 'mock_request' ), 10, 3 ); - remove_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - - $this->assertTrue( $webhook->ping() ); - - } - - /** - * Test the delivery failure setter. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_set_delivery_failure() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'student.created', - 'status' => 'active', - ) ); - - $i = 1; - while ( $i <= 6 ) { - - $webhook = LLMS_Unit_Test_Util::call_method( $webhook, 'set_delivery_failure' ); - - $this->assertEquals( $i, $webhook->get( 'failure_count' ) ); - $this->assertEquals( 6 === $i ? 'disabled' : 'active', $webhook->get( 'status' ) ); - $i++; - - } - - } - - /** - * Test the status condition of the should_deliver() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_should_deliver_status() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'student.created', - ) ); - - // Inactive. - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) ); - - // Active. - $webhook->set( 'status', 'active' )->save(); - $this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) ); - - } - - /** - * Test the status condition of the should_deliver() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_should_deliver_pending_delivery() { - - $webhook = LLMS_REST_API()->webhooks()->create( array( - 'delivery_url' => 'https://mock.tld', - 'topic' => 'student.created', - 'status' => 'active', - ) ); - - // Not Pending. - $this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) ); - - // Pending. - $webhook->set( 'pending_delivery', 1 )->save(); - $this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) ); - - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-webhooks-query.php b/tests/unit-tests/class-llms-rest-test-webhooks-query.php deleted file mode 100644 index 0fb7ffb4..00000000 --- a/tests/unit-tests/class-llms-rest-test-webhooks-query.php +++ /dev/null @@ -1,221 +0,0 @@ -query( "TRUNCATE TABLE {$wpdb->prefix}lifterlms_webhooks" ); - - } - - /** - * Test the get_webhooks() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_webhooks() { - - $query = new LLMS_REST_Webhooks_Query(); - $this->assertEquals( array(), $query->get_webhooks() ); - - $this->create_many_webhooks( 3 ); - - foreach ( array( true, false ) as $with_filters ) { - - $query = new LLMS_REST_Webhooks_Query( array( 'suppress_filters' => $with_filters ) ); - $keys = $query->get_webhooks(); - foreach ( $keys as $key ) { - $this->assertTrue( is_a( $key, 'LLMS_REST_Webhook' ) ); - } - - } - - - } - - /** - * Test the include and exclude arguments. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_include_and_exclude() { - - $this->create_many_webhooks( 5 ); - $query = new LLMS_REST_Webhooks_Query( array() ); - $ids = range( 1, 5 ); - - $this->create_many_webhooks( 5 ); - - $query = new LLMS_REST_Webhooks_Query( array( - 'include' => $ids, - ) ); - $this->assertEquals( 5, $query->found_results ); - $this->assertEquals( $ids, wp_list_pluck( $query->get_results(), 'id' ) ); - - $query = new LLMS_REST_Webhooks_Query( array( - 'exclude' => $ids, - ) ); - $this->assertEquals( 5, $query->found_results ); - $this->assertEquals( range( 6, 10 ), wp_list_pluck( $query->get_results(), 'id' ) ); - - } - - /** - * Test pagination of query results. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_pagination() { - - $this->create_many_webhooks( 25 ); - - $query = new LLMS_REST_Webhooks_Query( array() ); - $this->assertEquals( 10, count( $query->get_results() ) ); - $this->assertEquals( 25, $query->found_results ); - $this->assertEquals( 3, $query->max_pages ); - $this->assertEquals( range( 1, 10 ), wp_list_pluck( $query->get_results(), 'id' ) ); - $this->assertTrue( $query->is_first_page() ); - - $query = new LLMS_REST_Webhooks_Query( array( 'page' => 2 ) ); - $this->assertEquals( range( 11, 20 ), wp_list_pluck( $query->get_results(), 'id' ) ); - - $query = new LLMS_REST_Webhooks_Query( array( 'page' => 3 ) ); - $this->assertEquals( range( 21, 25 ), wp_list_pluck( $query->get_results(), 'id' ) ); - $this->assertTrue( $query->is_last_page() ); - - } - - /** - * Test the status filter arguments. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_status() { - - $this->create_many_webhooks( 5, 'active' ); - $this->create_many_webhooks( 5, 'disabled' ); - $this->create_many_webhooks( 5, 'paused' ); - - $query = new LLMS_REST_Webhooks_Query( array() ); - $this->assertEquals( 15, $query->found_results ); - - foreach ( array_keys( LLMS_REST_API()->webhooks()->get_statuses() ) as $status ) { - - $query = new LLMS_REST_Webhooks_Query( array( 'status' => $status ) ); - $this->assertEquals( 5, $query->found_results ); - - } - - } - - /** - * Test setting up default query args. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_setup_with_defaults() { - - $query = new LLMS_REST_Webhooks_Query(); - - $args = array( - 'include' => array(), - 'exclude' => array(), - 'page' => 1, - 'per_page' => 10, - 'sort' => array( - 'id' => 'ASC' - ), - ); - - foreach ( $args as $arg => $expect ) { - $this->assertEquals( $expect, $query->get( $arg ), $arg ); - } - - } - - /** - * Tests setting up all possible arguments with custom arguments. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_setup_with_custom() { - - $args = array( - 'include' => array( 1, 2, 3 ), - 'exclude' => array( 4, 5, 6 ), - 'page' => 5, - 'per_page' => 500, - 'sort' => array( - 'name' => 'ASC', - 'id' => 'DESC', - ), - ); - - $query = new LLMS_REST_Webhooks_Query( $args ); - - foreach ( $args as $arg => $expect ) { - $this->assertEquals( $expect, $query->get( $arg ), $arg ); - } - - } - - /** - * Merge default with custom arguments on setup. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_query_args_setup_with_merge() { - - $args = array( - 'include' => array( 1, 2, 3 ), - 'exclude' => array( 4, 5, 6 ), - 'sort' => array( - 'name' => 'ASC', - 'id' => 'DESC', - ), - ); - - $query = new LLMS_REST_Webhooks_Query( $args ); - - $args['page'] = 1; - $args['per_page'] = 10; - - foreach ( $args as $arg => $expect ) { - $this->assertEquals( $expect, $query->get( $arg ), $arg ); - } - - } - -} diff --git a/tests/unit-tests/class-llms-rest-test-webhooks.php b/tests/unit-tests/class-llms-rest-test-webhooks.php deleted file mode 100644 index 32174d2b..00000000 --- a/tests/unit-tests/class-llms-rest-test-webhooks.php +++ /dev/null @@ -1,524 +0,0 @@ -webhooks = LLMS_REST_API()->webhooks(); - - } - - /** - * Can't create a webhook with an ID. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_with_id() { - - $ret = $this->webhooks->create( array( 'id' => 1 ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_exists', $ret ); - - } - - /** - * Can't create a webhook with a bad url. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_bad_url() { - - remove_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - - $ret = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_unreachable', $ret ); - - add_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - - } - - /** - * Creation attempts missing required columns should fail. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_required_cols() { - - $to_test = array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ); - $data = array(); - - foreach ( $to_test as $key => $val ) { - - $ret = $this->webhooks->create( $data ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_missing_' . $key, $ret ); - $data[ $key ] = $val; - - } - - } - - /** - * Fill required data with default data during creation. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_with_defaults() { - - $data = array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ); - - $user_id = $this->factory->user->create(); - wp_set_current_user( $user_id ); - - $ret = $this->webhooks->create( $data ); - - $this->assertEquals( 'disabled', $ret->get( 'status' ) ); - $this->assertEquals( 0, $ret->get( 'failure_count' ) ); - $this->assertEquals( 0, $ret->get( 'pending_delivery' ) ); - $this->assertEquals( $user_id, $ret->get( 'user_id' ) ); - - $this->assertEquals( 50, strlen( $ret->get( 'secret' ) ) ); - - $this->assertEquals( 0, strpos( $ret->get( 'name' ), 'Webhook created on ' ) ); - - } - - /** - * Create with entirely custom values. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_all_vals() { - - $data = array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - 'name' => 'Mock Webhook Name', - 'status' => 'active', - 'secret' => 'DontTellAnyonePlease', - ); - - $ret = $this->webhooks->create( $data ); - - foreach ( $data as $key => $val ) { - $this->assertEquals( $val, $ret->get( $key ) ); - } - - } - - /** - * Ensure created/updated dates are automatically added during creation. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_dates() { - - $time = current_time( 'timestamp' ); - llms_tests_mock_current_time( $time ); - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - $this->assertEquals( $time, strtotime( $hook->get( 'created' ) ) ); - $this->assertEquals( $time, strtotime( $hook->get( 'updated' ) ) ); - - llms_tests_reset_current_time( $time ); - - } - - /** - * Test deleting a webhook. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_delete() { - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - // Can't delete a non-existant webhook. - $this->assertFalse( $this->webhooks->delete( $hook->get( 'id' ) + 1 ) ); - - // Deleted. - $this->assertTrue( $this->webhooks->delete( $hook->get( 'id' ) ) ); - - // Can't be found. - $this->assertFalse( $this->webhooks->get( $hook->get( 'id' ) ) ); - - // Can't be deleted again. - $this->assertFalse( $this->webhooks->delete( $hook->get( 'id' ) ) ); - - } - - /** - * Test hook getter. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get() { - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - // Get the hook. - $get = $this->webhooks->get( $hook->get( 'id' ) ); - $this->assertEquals( $hook->get( 'id' ), $get->get( 'id' ) ); - - // Non-existant hook. - $this->assertFalse( $this->webhooks->get( $hook->get( 'id' ) + 1 ) ); - - } - - /** - * Can't create with invalid status - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_data_valid_status() { - - $data = array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ); - - $tests = array( 'mock', '', false, true ); - foreach ( $tests as $val ) { - - $data['status'] = $val; - $ret = LLMS_Unit_Test_Util::call_method( $this->webhooks, 'is_data_valid', array( $data ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_status', $ret ); - - } - - } - - /** - * Can't create with invalid topic - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_data_valid_topic() { - - $data = array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - 'status' => 'disabled', - ); - - $tests = array( 'mock', '', false, true, 'course.fake' ); - foreach ( $tests as $val ) { - - $data['topic'] = $val; - $ret = LLMS_Unit_Test_Util::call_method( $this->webhooks, 'is_data_valid', array( $data ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_topic', $ret ); - - } - - } - - /** - * Can't create/update with an empty description. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_data_valid_description() { - - $data = array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - 'status' => 'disabled', - ); - - $tests = array( false, 0, '' ); - foreach ( $tests as $val ) { - - $data['name'] = $val; - $ret = LLMS_Unit_Test_Util::call_method( $this->webhooks, 'is_data_valid', array( $data ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_name', $ret ); - - } - - } - - /** - * Validate delivery url (can't be empty) - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_data_valid_delivery_url() { - - $data = array( - 'topic' => 'course.created', - 'status' => 'disabled', - ); - - $tests = array( false, 0, '' ); - foreach ( $tests as $val ) { - - $data['delivery_url'] = $val; - $ret = LLMS_Unit_Test_Util::call_method( $this->webhooks, 'is_data_valid', array( $data ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_delivery_url', $ret ); - - } - - } - - /** - * Test default column values getter - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_default_column_values() { - - $vals = $this->webhooks->get_default_column_values(); - - $this->assertEquals( 50, strlen( $vals['secret'] ) ); - $this->assertEquals( 'disabled', $vals['status'] ); - $this->assertEquals( 0, $vals['failure_count'] ); - $this->assertEquals( 0, $vals['pending_delivery'] ); - - } - - /** - * Test the is_topic_valid() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_is_topic_valid() { - - $tests = array_fill_keys( array_keys( $this->webhooks->get_topics() ), true ); - - $tests['action.mock'] = true; - $tests['course.fake'] = false; - $tests['courses.created'] = false; - $tests['action'] = false; - $tests['action.'] = false; - - foreach ( $tests as $topic => $expected ) { - - $this->assertEquals( $expected, LLMS_Unit_Test_Util::call_method( $this->webhooks, 'is_topic_valid', array( $topic ) ), $topic ); - - } - - } - - /** - * Can't update without supplying an ID - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_no_id() { - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - $ret = $this->webhooks->update( array() ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_missing_id', $ret ); - - } - - /** - * Can't update something that doesn't exist - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_non_existant() { - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - $ret = $this->webhooks->update( array( 'id' => $hook->get( 'id' ) + 1 ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_webhook', $ret ); - - } - - /** - * Can't supply an empty url during an update - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_blank_url() { - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - $ret = $this->webhooks->update( array( - 'id' => $hook->get( 'id' ), - 'delivery_url' => '', - ) ); - - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_invalid_delivery_url', $ret ); - - } - - /** - * test updating - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update() { - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - $args = array( - 'id' => $hook->get( 'id' ), - 'topic' => 'action.mock', - 'delivery_url' => 'http://mock.com', - 'pending_delivery' => 1, - 'failure_count' => 5, - 'name' => 'Changed it', - 'secret' => 'new secret', - ); - - $ret = $this->webhooks->update( $args ); - - foreach ( $args as $key => $expected ) { - - $this->assertEquals( $expected, $ret->get( $key ) ); - - } - - } - - /** - * Test updating delivery_url to a bad url. - * - * @since 1.0.0-beta.1 - * - * @see {Reference} - * @link {URL} - * - * @return [type] - */ - public function test_update_bad_url() { - - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - - remove_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - - $ret = $this->webhooks->update( array( - 'id' => $hook->get( 'id' ), - 'delivery_url' => 'https://mock.tld' - ) ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_unreachable', $ret ); - - add_filter( 'llms_rest_webhook_pre_ping', '__return_true' ); - - } - - /** - * Test that the updated date is automatically updated during an update. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_updated_date() { - - llms_tests_mock_current_time( strtotime( '-10 minutes' ) ); - $hook = $this->webhooks->create( array( - 'topic' => 'course.created', - 'delivery_url' => 'https://mock.com', - ) ); - llms_tests_reset_current_time(); - - $ret = $this->webhooks->update( array( - 'id' => $hook->get( 'id' ), - 'topic' => 'action.mock', - ) ); - - $this->assertTrue( $ret->get( 'updated' ) > $ret->get( 'created' ) ); - - } - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-abstract-users-controller.php b/tests/unit-tests/server/class-llms-rest-test-abstract-users-controller.php deleted file mode 100644 index f21bb2b5..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-abstract-users-controller.php +++ /dev/null @@ -1,102 +0,0 @@ -stub = new class extends LLMS_REST_Users_Controller { - - // stub required abstract method. - protected function get_object( $id ) { return $id; } - - }; - - $this->request = new WP_REST_Request( 'POST', 'mock' ); - - } - - /** - * Filter for testing banned usernames added via the `illegal_user_logins` filter. - * - * @since 1.0.0-beta.1 - * - * @param string[] $illegal List of illegal usernames. - * @return string[] - */ - public function get_illegal_user_logins( $illegal ) { - $illegal[] = 'illegal'; - return $illegal; - } - - - /** - * Test the sanitize_password method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_sanitize_password() { - - // Good. - $this->assertEquals( 'password', $this->stub->sanitize_username( 'password', $this->request, 'username' ) ); - - // Illegal chars. - $ret = $this->stub->sanitize_username( 'mock\\password', $this->request, 'username' ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $ret ); - - } - - - /** - * Test the sanitize_username method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_sanitize_username() { - - // Good. - $this->assertEquals( 'okay', $this->stub->sanitize_username( 'okay', $this->request, 'username' ) ); - - // Illegal chars. - $ret = $this->stub->sanitize_username( '¯\_(ツ)_/¯', $this->request, 'username' ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $ret ); - - // Banned username. - add_filter( 'illegal_user_logins', array( $this, 'get_illegal_user_logins' ) ); - - $ret = $this->stub->sanitize_username( 'illegal', $this->request, 'username' ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $ret ); - - $this->assertEquals( 'something-else', $this->stub->sanitize_username( 'something-else', $this->request, 'username' ) ); - - remove_filter( 'illegal_user_logins', array( $this, 'get_illegal_user_logins' ) ); - - } - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-api-keys-controller.php b/tests/unit-tests/server/class-llms-rest-test-api-keys-controller.php deleted file mode 100644 index db437cf2..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-api-keys-controller.php +++ /dev/null @@ -1,475 +0,0 @@ -user_allowed = $this->factory->user->create( array( 'role' => 'administrator', ) ); - $this->user_forbidden = $this->factory->user->create( array( 'role' => 'subscriber', ) ); - $this->endpoint = new LLMS_REST_API_Keys_Controller(); - - } - - /** - * Teardown test - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function tearDown() { - - parent::tearDown(); - - global $wpdb; - $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}lifterlms_api_keys" ); - - } - - /** - * Test route registration. - * - * @since 1.0.0-beta.1 - */ - public function test_register_routes() { - - $routes = $this->server->get_routes(); - $this->assertArrayHasKey( $this->route, $routes ); - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)', $routes ); - - } - - public function test_get_item_schema() { - - $schema = $this->endpoint->get_item_schema(); - $this->assertTrue( array_key_exists( '$schema', $schema ) ); - $this->assertTrue( array_key_exists( 'title', $schema ) ); - $this->assertTrue( array_key_exists( 'type', $schema ) ); - $this->assertTrue( array_key_exists( 'properties', $schema ) ); - $this->assertTrue( array_key_exists( 'description', $schema['properties'] ) ); - $this->assertTrue( array_key_exists( 'permissions', $schema['properties'] ) ); - $this->assertTrue( array_key_exists( 'user_id', $schema['properties'] ) ); - $this->assertTrue( array_key_exists( 'truncated_key', $schema['properties'] ) ); - $this->assertTrue( array_key_exists( 'last_access', $schema['properties'] ) ); - - } - - /** - * Test error responses for creating a key - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_item_errors() { - - // Empty body. - $response = $this->perform_mock_request( 'POST', $this->route ); - $this->assertResponseStatusEquals( 400, $response ); - $this->assertResponseCodeEquals( 'rest_missing_callback_param', $response ); - - // Unauthorized. - $args = array( - 'description' => 'Mock Description', - 'user_id' => $this->factory->user->create(), - 'permissions' => 'read', - ); - $response = $this->perform_mock_request( 'POST', $this->route, $args ); - $this->assertResponseStatusEquals( 401, $response ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $response ); - - // Forbidden. - wp_set_current_user( $this->user_forbidden ); - $response = $this->perform_mock_request( 'POST', $this->route, $args ); - $this->assertResponseStatusEquals( 403, $response ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $response ); - - // Invalid submitted user_id - wp_set_current_user( $this->user_allowed ); - $args['user_id'] = 9032423402934; - $response = $this->perform_mock_request( 'POST', $this->route, $args ); - $this->assertResponseStatusEquals( 400, $response ); - $this->assertResponseCodeEquals( 'rest_invalid_param', $response ); - - } - - /** - * Test creation of a new key success. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_item_success() { - - wp_set_current_user( $this->user_allowed ); - $args = array( - 'description' => 'Mock Description', - 'user_id' => $this->factory->user->create(), - 'permissions' => 'read', - ); - $response = $this->perform_mock_request( 'POST', $this->route, $args ); - - $this->assertResponseStatusEquals( 201, $response ); - - $res_data = $response->get_data(); - - $this->assertEquals( $args['description'], $res_data['description'] ); - $this->assertEquals( $args['user_id'], $res_data['user_id'] ); - $this->assertEquals( $args['permissions'], $res_data['permissions'] ); - $this->assertTrue( array_key_exists( 'id', $res_data ) ); - $this->assertTrue( array_key_exists( 'consumer_key', $res_data ) ); - $this->assertTrue( array_key_exists( 'consumer_secret', $res_data ) ); - $this->assertTrue( array_key_exists( 'last_access', $res_data ) ); - $this->assertEquals( $res_data['truncated_key'], substr( $res_data['consumer_key'], -7 ) ); - - $headers = $response->get_headers(); - $this->assertTrue( array_key_exists( 'Location', $headers ) ); - - $links = $response->get_links(); - $this->assertTrue( array_key_exists( 'self', $links ) ); - $this->assertTrue( array_key_exists( 'collection', $links ) ); - $this->assertTrue( array_key_exists( 'user', $links ) ); - - } - - /** - * Test the permissions check methods. - * - * @return void - */ - public function test_check_permissions() { - - $request = new WP_REST_Request( 'GET', $this->route ); - - $methods = array( - 'create_item_permissions_check', - 'delete_item_permissions_check', - 'get_item_permissions_check', - 'get_items_permissions_check', - 'update_item_permissions_check', - ); - - // No user. - wp_set_current_user( null ); - foreach ( $methods as $method ) { - $res = $this->endpoint->{$method}( $request ); - $this->assertIsWPError( $res ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $res ); - } - - - // Disallowed User. - wp_set_current_user( $this->user_forbidden ); - foreach ( $methods as $method ) { - $res = $this->endpoint->{$method}( $request ); - $this->assertIsWPError( $res ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $res ); - } - - // Allowed User. - wp_set_current_user( $this->user_allowed ); - foreach ( $methods as $method ) { - $this->assertTrue( $this->endpoint->{$method}( $request ) ); - } - - } - - /** - * test the delete_item() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_delete_item() { - - wp_set_current_user( $this->user_allowed ); - - $key = $this->get_mock_api_key( 'read_write', $this->user_allowed, false ); - $id = $key->get( 'id' ); - - // Successful deletion. - $response = $this->perform_mock_request( 'DELETE', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertResponseStatusEquals( 204, $response ); - $this->assertFalse( LLMS_REST_API()->keys()->get( $id ) ); - - // Responds 204 even if resource can't be found. - $response = $this->perform_mock_request( 'DELETE', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertResponseStatusEquals( 204, $response ); - - } - - /** - * test the get_item() for an invalid resource. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_item_not_found() { - - wp_set_current_user( $this->user_allowed ); - - $key = $this->get_mock_api_key( 'read_write', $this->user_allowed, false ); - $id = $key->get( 'id' ) + 1; - - $response = $this->perform_mock_request( 'GET', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertResponseStatusEquals( 404, $response ); - $this->assertResponseCodeEquals( 'llms_rest_not_found', $response ); - - } - - /** - * test the get_item() for an invalid resource. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_item_success() { - - wp_set_current_user( $this->user_allowed ); - - $key = $this->get_mock_api_key( 'read_write', $this->user_allowed, false ); - $id = $key->get( 'id' ); - - $response = $this->perform_mock_request( 'GET', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertResponseStatusEquals( 200, $response ); - - $res_data = $response->get_data(); - - $this->assertEquals( $id, $res_data['id'] ); - $this->assertEquals( $key->get( 'description' ), $res_data['description'] ); - $this->assertEquals( $key->get( 'permissions' ), $res_data['permissions'] ); - $this->assertEquals( $key->get( 'user_id' ), $res_data['user_id'] ); - $this->assertEquals( $key->get( 'user_id' ), $res_data['user_id'] ); - $this->assertEquals( $key->get( 'truncated_key' ), $res_data['truncated_key'] ); - $this->assertTrue( array_key_exists( 'last_access', $res_data ) ); - - $links = $response->get_links(); - $this->assertTrue( array_key_exists( 'self', $links ) ); - $this->assertTrue( array_key_exists( 'collection', $links ) ); - $this->assertTrue( array_key_exists( 'user', $links ) ); - - } - - /** - * test the get_items() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_items_pagination() { - - wp_set_current_user( $this->user_allowed ); - - // No results. - $response = $this->perform_mock_request( 'GET', $this->route ); - $this->assertResponseStatusEquals( 200, $response ); - - // Make keys for remaining tests. - $keys = $this->create_many_api_keys( 25 ); - - // Page 1. - $response = $this->perform_mock_request( 'GET', $this->route ); - - $body = $response->get_data(); - $headers = $response->get_headers(); - - $links = $this->parse_link_headers( $response ); - - $this->assertResponseStatusEquals( 200, $response ); - $this->assertEquals( 25, $headers['X-WP-Total'] ); - $this->assertEquals( 3, $headers['X-WP-TotalPages'] ); - $this->assertEquals( array( 'first', 'next', 'last' ), array_keys( $links ) ); - - $this->assertEquals( range( 1, 10 ), wp_list_pluck( $body, 'id' ) ); - - // Page 2. - $response = $this->perform_mock_request( 'GET', $this->route, array(), array( 'page' => 2 ) ); - - $body = $response->get_data(); - $headers = $response->get_headers(); - - $links = $this->parse_link_headers( $response ); - - $this->assertResponseStatusEquals( 200, $response ); - $this->assertEquals( 25, $headers['X-WP-Total'] ); - $this->assertEquals( 3, $headers['X-WP-TotalPages'] ); - $this->assertEquals( array( 'first', 'prev', 'next', 'last' ), array_keys( $links ) ); - - $this->assertEquals( range( 11, 20 ), wp_list_pluck( $body, 'id' ) ); - - // Page 3. - $response = $this->perform_mock_request( 'GET', $this->route, array(), array( 'page' => 3 ) ); - - $body = $response->get_data(); - $headers = $response->get_headers(); - - $links = $this->parse_link_headers( $response ); - - $this->assertResponseStatusEquals( 200, $response ); - $this->assertEquals( 25, $headers['X-WP-Total'] ); - $this->assertEquals( 3, $headers['X-WP-TotalPages'] ); - $this->assertEquals( array( 'first', 'prev', 'last' ), array_keys( $links ) ); - - $this->assertEquals( range( 21, 25 ), wp_list_pluck( $body, 'id' ) ); - - // Out of bounds. - $response = $this->perform_mock_request( 'GET', $this->route, array(), array( 'page' => 4 ) ); - - $this->assertResponseStatusEquals( 400, $response ); - $this->assertResponseCodeEquals( 'llms_rest_bad_request', $response ); - - } - - /** - * test the update_item() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_item() { - - wp_set_current_user( $this->user_allowed ); - - $key = $this->get_mock_api_key( 'read_write', $this->user_allowed, false ); - $id = $key->get( 'id' ); - - $updates = array( - 'description' => 'New Description', - 'user_id' => $this->factory->user->create(), - 'permissions' => 'read', - ); - - $response = $this->perform_mock_request( 'POST', sprintf( '%1$s/%2$d', $this->route, $id ), $updates ); - $this->assertResponseStatusEquals( 200, $response ); - - $res_data = $response->get_data(); - - $this->assertEquals( $id, $res_data['id'] ); - $this->assertEquals( $updates['description'], $res_data['description'] ); - $this->assertEquals( $updates['permissions'], $res_data['permissions'] ); - $this->assertEquals( $updates['user_id'], $res_data['user_id'] ); - $this->assertEquals( $key->get( 'truncated_key' ), $res_data['truncated_key'] ); - - $links = $response->get_links(); - $this->assertTrue( array_key_exists( 'self', $links ) ); - $this->assertTrue( array_key_exists( 'collection', $links ) ); - $this->assertTrue( array_key_exists( 'user', $links ) ); - - } - - /** - * Test the prepare collection query args method. - * - * @since 1.0.0-beta.1 - * - * @return [type] - */ - public function test_prepare_collection_query_args() { - - $route = $this->route; - - // Defaults (no args passed). - $request = new WP_REST_Request( 'GET', $route ); - $args = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_collection_query_args', array( $request ) ); - $this->assertEquals( array(), $args ); - - // Pass order and use default orderby. - $request = new WP_REST_Request( 'GET', $route ); - $request->set_query_params( array( 'order' => 'desc' ) ); - $args = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_collection_query_args', array( $request ) ); - $this->assertEquals( array( - 'sort' => array( - 'id' => 'desc', - ), - ), $args ); - - // Pass orderby and use default order. - $request = new WP_REST_Request( 'GET', $route ); - $request->set_query_params( array( 'orderby' => 'last_access' ) ); - $args = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_collection_query_args', array( $request ) ); - $this->assertEquals( array( - 'sort' => array( - 'last_access' => 'asc', - ), - ), $args ); - - // Pass orderby and order. - $request = new WP_REST_Request( 'GET', $route ); - $request->set_query_params( array( - 'orderby' => 'last_access', - 'order' => 'desc' - ) ); - $args = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_collection_query_args', array( $request ) ); - $this->assertEquals( array( - 'sort' => array( - 'last_access' => 'desc', - ), - ), $args ); - - // Set other args. - // Pass orderby and order. - $request = new WP_REST_Request( 'GET', $route ); - $request->set_query_params( array( - 'include' => '1,2,3,4,5', - 'exclude' => '83', - 'user' => '1', - 'user_not_in' => '25,26', - 'permissions' => 'read', - ) ); - $args = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_collection_query_args', array( $request ) ); - $this->assertEquals( array( - 'include' => range( 1, 5 ), - 'exclude' => array( 83 ), - 'user' => array( 1 ), - 'user_not_in' => array( 25, 26 ), - 'permissions' => 'read', - ), $args ); - - } - - /** - * Test the validate_user_exists callback method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_validate_user_exists() { - - $this->assertTrue( $this->endpoint->validate_user_exists( $this->user_allowed ) ); - $this->assertFalse( $this->endpoint->validate_user_exists( $this->factory->user->create() + 1 ) ); - - } - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-courses.php b/tests/unit-tests/server/class-llms-rest-test-courses.php deleted file mode 100644 index 2cdc0e13..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-courses.php +++ /dev/null @@ -1,1341 +0,0 @@ -endpoint = new LLMS_REST_Courses_Controller(); - $this->user_allowed = $this->factory->user->create( - array( - 'role' => 'administrator', - ) - ); - - $this->user_forbidden = $this->factory->user->create( - array( - 'role' => 'subscriber', - ) - ); - - $this->sample_course_args = array( - 'title' => array( - 'rendered' => 'Getting Started with LifterLMS', - 'raw' => 'Getting Started with LifterLMS', - ), - 'content' => array( - 'rendered' => "\\n

Lorem ipsum dolor sit amet.

\\n\\n\\n\\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

\\n", - 'raw' => "\\n

Lorem ipsum dolor sit amet.

\\n\\n\\n\\n

Expectoque quid ad id, quod quaerebam, respondeas. Nec enim, omnes avaritias si aeque avaritias esse dixerimus, sequetur ut etiam aequas esse dicamus.

\\n", - ), - 'date_created' => '2019-05-20 17:22:05', - 'status' => 'publish', - ); - - global $wpdb; - $wpdb->delete( $wpdb->prefix . 'posts', array( 'post_type' => $this->post_type ) ); - - // assume all courses have been migrated to the block editor to avoid adding parts to the content. - add_filter( 'llms_blocks_is_post_migrated', '__return_true' ); - } - - /** - * Test route registration. - * - * @since 1.0.0-beta.1 - */ - public function test_register_routes() { - - $routes = $this->server->get_routes(); - $this->assertArrayHasKey( $this->route, $routes ); - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)', $routes ); - - // Enrollments. - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)/enrollments', $routes ); - // Child sections. - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)/content', $routes ); - } - - - /** - * Test list courses. - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses() { - - wp_set_current_user( $this->user_allowed ); - - // create 12 courses. - $courses = $this->factory->course->create_many( 12, array( 'sections' => 0 ) ); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route ) ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - $this->assertEquals( 10, count( $res_data ) ); // default per_page is 10. - - // Check retrieved courses are the same as the generated ones. - // Note: the check can be done in this simple way as by default the rest api courses are ordered by id. - for ( $i = 0; $i < 10; $i++ ) { - $this->llms_posts_fields_match( new LLMS_Course( $courses[ $i ] ), $res_data[ $i ] ); - } - - $headers = $response->get_headers(); - $this->assertEquals( 12, $headers['X-WP-Total'] ); - $this->assertEquals( 2, $headers['X-WP-TotalPages'] ); - - } - - /** - * Test list courses pagination success. - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses_with_pagination() { - - wp_set_current_user( $this->user_allowed ); - - // create 15 courses. - $courses = $this->factory->course->create_many( 15, array( 'sections' => 0 ) ); - $request = new WP_REST_Request( 'GET', $this->route ); - $request->set_param( 'page', 2 ); - - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $this->assertEquals( 5, count( $res_data ) ); - - // Check retrieved courses are the same as the generated ones with an offset of 10 (first page). - // Note: the check can be done in this simple way as by default the rest api courses are ordered by id. - for ( $i = 0; $i < 5; $i++ ) { - $this->llms_posts_fields_match( new LLMS_Course( $courses[ $i + 10 ] ), $res_data[ $i ] ); - } - - } - - /** - * Test list courses include arg - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses_include() { - - wp_set_current_user( $this->user_allowed ); - - // create 15 courses. - $courses = $this->factory->course->create_many( 5, array( 'sections' => 0 ) ); - $request = new WP_REST_Request( 'GET', $this->route ); - - // get only the 2nd and 3rd course. - $request->set_param( 'include', "$courses[1], $courses[2]" ); - - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $this->assertEquals( 2, count( $res_data ) ); - - // Check retrieved courses are the same as the second and third generated courses. - for ( $i = 0; $i < 2; $i++ ) { - $this->llms_posts_fields_match( new LLMS_Course( $courses[ $i + 1 ] ), $res_data[ $i ] ); - } - - } - - /** - * Test list courses exclude arg - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses_exclude() { - - wp_set_current_user( $this->user_allowed ); - - // create 15 courses. - $courses = $this->factory->course->create_many( 5, array( 'sections' => 0 ) ); - $request = new WP_REST_Request( 'GET', $this->route ); - - // get only the 2nd and 3rd course. - $request->set_param( 'exclude', "$courses[0], $courses[1]" ); - - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $this->assertEquals( 3, count( $res_data ) ); - // Check retrieved data do not contain first and second created courses. - $this->assertEquals( array_slice( $courses, 2 ), wp_list_pluck( $res_data, 'id' ) ); - } - - /** - * Test list courses ordered by id desc. - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses_ordered_by_id_desc() { - - wp_set_current_user( $this->user_allowed ); - - // create 5 courses. - $courses = $this->factory->course->create_many( 5, array( 'sections' => 0 ) ); - $request = new WP_REST_Request( 'GET', $this->route ); - $request->set_param( 'order', 'desc' ); // default is 'asc'. - - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - // Check retrieved courses are the same as the generated ones but in the reversed order. - // Note: the check can be done in this simple way as by default the rest api courses are ordered by id. - $reversed_data = array_reverse( $res_data ); - for ( $i = 0; $i < 5; $i++ ) { - $this->llms_posts_fields_match( new LLMS_Course( $courses[ $i ] ), $reversed_data[ $i ] ); - } - - } - - /** - * Test list courses ordered by title. - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses_ordered_by_title() { - - wp_set_current_user( $this->user_allowed ); - - // create 3 courses. - $courses = $this->factory->course->create_many( 3, array( 'sections' => 0 ) ); - - $course_first = new LLMS_Course( $courses[0] ); - $course_first->set( 'title', 'Course B' ); - $course_second = new LLMS_Course( $courses[1] ); - $course_second->set( 'title', 'Course A' ); - $course_second = new LLMS_Course( $courses[2] ); - $course_second->set( 'title', 'Course C' ); - - $request = new WP_REST_Request( 'GET', $this->route ); - $request->set_param( 'orderby', 'title' ); // default is id. - - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - // Check retrieved courses are ordered by title asc. - $this->assertEquals( 'Course A', $res_data[0]['title']['rendered'] ); - $this->assertEquals( 'Course B', $res_data[1]['title']['rendered'] ); - $this->assertEquals( 'Course C', $res_data[2]['title']['rendered'] ); - } - - /** - * Test list courses ordered by title - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses_ordered_by_title_desc() { - - wp_set_current_user( $this->user_allowed ); - - // create 3 courses. - $courses = $this->factory->course->create_many( 3, array( 'sections' => 0 ) ); - - $course_first = new LLMS_Course( $courses[0] ); - $course_first->set( 'title', 'Course B' ); - $course_second = new LLMS_Course( $courses[1] ); - $course_second->set( 'title', 'Course A' ); - $course_second = new LLMS_Course( $courses[2] ); - $course_second->set( 'title', 'Course C' ); - - $request = new WP_REST_Request( 'GET', $this->route ); - $request->set_param( 'orderby', 'title' ); // default is id. - $request->set_param( 'order', 'desc' ); // default is 'asc'. - - $response = $this->server->dispatch( $request ); - $res_data = $response->get_data(); - - // Check retrieved courses are ordered by title desc. - $this->assertEquals( 'Course C', $res_data[0]['title']['rendered'] ); - $this->assertEquals( 'Course B', $res_data[1]['title']['rendered'] ); - $this->assertEquals( 'Course A', $res_data[2]['title']['rendered'] ); - } - - /** - * Test getting courses without permission. - * - * @since 1.0.0-beta.1 - *//* - public function test_get_courses_without_permission() { - - wp_set_current_user( 0 ); - - // Setup course. - $this->factory->course->create(); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route ) ); - - // Check we don't have permissions to make this request. - $this->assertEquals( 401, $response->get_status() ); - - } - */ - - /** - * Test getting courses: forbidden request. - * - * @since 1.0.0-beta.1 - *//* - public function test_get_courses_forbidden() { - - wp_set_current_user( $this->user_forbidden ); - - // Setup course. - $this->factory->course->create(); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route ) ); - - // Check we're not allowed to get results. - $this->assertEquals( 403, $response->get_status() ); - - }*/ - - /** - * Test getting courses: bad request. - * - * @since 1.0.0-beta.1 - */ - public function test_get_courses_bad_request() { - - wp_set_current_user( $this->user_allowed ); - - // create 5 courses. - $courses = $this->factory->course->create_many( 5, array( 'sections' => 0 ) ); - $request = new WP_REST_Request( 'GET', $this->route ); - - // Bad request, there's no page 2. - $request->set_param( 'page', 2 ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 400, $response->get_status() ); - - // Bad request, order param allowed are only "desc" and "asc" (emum). - $request->set_param( 'order', 'not_desc' ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 400, $response->get_status() ); - - } - - /** - * Test getting a single course. - * - * @since 1.0.0-beta.1 - */ - public function test_get_course() { - - wp_set_current_user( $this->user_allowed ); - - // Setup course. - $course = $this->factory->course->create_and_get(); - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course->get( 'id' ) ) ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - // Check retrieved course matches the created ones. - $this->llms_posts_fields_match( $course, $response->get_data() ); - - } - - - /** - * Test getting single course without permission. - * - * @since 1.0.0-beta.1 - */ - /* - public function test_get_course_without_permission() { - - wp_set_current_user( 0 ); - - // Setup course. - $course_id = $this->factory->course->create(); - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course_id ) ); - - // Check we don't have permissions to make this request. - $this->assertEquals( 401, $response->get_status() ); - - } - */ - - /** - * Test getting forbidden single course. - * - * @since 1.0.0-beta.1 - */ - /* - public function test_get_course_forbidden() { - - wp_set_current_user( $this->user_forbidden ); - - // Setup course. - $course_id = $this->factory->course->create(); - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course_id ) ); - - // Check we're not allowed to get results. - $this->assertEquals( 403, $response->get_status() ); - - } - */ - - /** - * Test getting single course that doesn't exist. - * - * @since 1.0.0-beta.1 - */ - public function test_get_nonexistent_course() { - - wp_set_current_user( 0 ); - - // Setup course. - $course_id = $this->factory->course->create(); - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course_id . '4' ) ); - - // the course doesn't exists. - $this->assertEquals( 404, $response->get_status() ); - - } - - /** - * Test creating a single course. - * - * @since 1.0.0-beta.1 - */ - public function test_create_course() { - - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $catalog_visibility = array_keys( llms_get_product_visibility_options() )[2]; - $sample_course_args = array_merge( - $this->sample_course_args, - array( - 'catalog_visibility' => $catalog_visibility, - 'instructors' => array( - get_current_user_id(), - $this->factory->user->create( - array( - 'role' => 'instructor', - ) - ), - ), - 'video_tile' => true, - ) - ); - - $request->set_body_params( $sample_course_args ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 201, $response->get_status() ); - - $res_data = $response->get_data(); - - $this->assertEquals( $sample_course_args['title']['rendered'], $res_data['title']['rendered'] ); - /** - * The rtrim below is not ideal but at the moment we have templates printed after the course summary (e.g. prerequisites) that, - * even when printing no data they still print "\n". Let's pretend we're not interested in testing the trailing "\n" presence. - */ - $this->assertEquals( rtrim( $sample_course_args['content']['rendered'], "\n" ), rtrim( $res_data['content']['rendered'], "\n" ) ); - - $this->assertEquals( $sample_course_args['date_created'], $res_data['date_created'] ); - $this->assertEquals( $sample_course_args['status'], $res_data['status'] ); - $this->assertEquals( $sample_course_args['catalog_visibility'], $res_data['catalog_visibility'] ); - $this->assertEquals( $sample_course_args['instructors'], $res_data['instructors'] ); - $this->assertEquals( $sample_course_args['video_tile'], $res_data['video_tile'] ); - - } - - /** - * Test creating a single course defaults are correctly set. - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_check_defaults() { - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $course_args = array( - 'title' => 'Title', - 'content' => 'Content', - 'access_opens_date' => '2019-05-22 17:20:05', - 'access_closes_date' => '2019-05-22 17:23:08', - 'enrollment_opens_date' => '2019-05-22 17:22:05', - 'enrollment_closes_date' => '2019-05-22 17:22:08', - ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - // Check defaults. - // Access period messages. - $this->assertEquals( 'This course opens on [lifterlms_course_info id=' . $res_data['id'] . ' key="start_date"].', $res_data['access_opens_message']['raw'] ); - $this->assertEquals( do_shortcode( 'This course opens on [lifterlms_course_info id=' . $res_data['id'] . ' key="start_date"].' ), $res_data['access_opens_message']['rendered'] ); - $this->assertEquals( 'This course closed on [lifterlms_course_info id=' . $res_data['id'] . ' key="end_date"].', $res_data['access_closes_message']['raw'] ); - $this->assertEquals( do_shortcode( 'This course closed on [lifterlms_course_info id=' . $res_data['id'] . ' key="end_date"].' ), $res_data['access_closes_message']['rendered'] ); - - // Enrollment period messages. - $this->assertEquals( 'Enrollment in this course opens on [lifterlms_course_info id=' . $res_data['id'] . ' key="enrollment_start_date"].', $res_data['enrollment_opens_message']['raw'] ); - $this->assertEquals( do_shortcode( 'Enrollment in this course opens on [lifterlms_course_info id=' . $res_data['id'] . ' key="enrollment_start_date"].' ), $res_data['enrollment_opens_message']['rendered'] ); - $this->assertEquals( 'Enrollment in this course closed on [lifterlms_course_info id=' . $res_data['id'] . ' key="enrollment_end_date"].', $res_data['enrollment_closes_message']['raw'] ); - $this->assertEquals( do_shortcode( 'Enrollment in this course closed on [lifterlms_course_info id=' . $res_data['id'] . ' key="enrollment_end_date"].' ), $res_data['enrollment_closes_message']['rendered'] ); - - // Capacity enabled. - $this->assertFalse( $res_data['capacity_enabled'] ); - - // Catalog visibility. - $this->assertEquals( 'catalog_search', $res_data['catalog_visibility'] ); - - // Categories. - $this->assertEquals( array(), $res_data['categories'] ); - - // Comment_status. - $this->assertEquals( 'open', $res_data['comment_status'] ); - - // Difficulties. - $this->assertEquals( array(), $res_data['difficulties'] ); - - // Instructors. If empty, llms core responds with the course author in an array. - $this->assertEquals( array( get_current_user_id() ), $res_data['instructors'] ); - - // Menu order. - $this->assertEquals( 0, $res_data['menu_order'] ); - - // Comment_status. - $this->assertEquals( 'open', $res_data['ping_status'] ); - - // Sales page type. - $this->assertEquals( 'none', $res_data['sales_page_page_type'] ); - - // Status. - $this->assertEquals( 'publish', $res_data['status'] ); - - // Tags. - $this->assertEquals( array(), $res_data['tags'] ); - - // Tracks. - $this->assertEquals( array(), $res_data['tracks'] ); - - // Video tile. - $this->assertFalse( $res_data['video_tile'] ); - } - - /** - * Test creating a single course special props. - * These props, when set, alter the rendered content so we test them separetaly. - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_special() { - - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $sample_course_args = array_merge( - $this->sample_course_args, - array( - 'audio_embed' => 'https://www.youtube.com/abc', - 'video_embed' => 'www.youtube.com/efg', - 'capacity_limit' => 22, - 'capacity_enabled' => true, - 'capacity_message' => 'Enrollment has closed because the maximum number of allowed students has been reached.', - 'access_opens_date' => '2019-05-22 17:20:05', - 'access_closes_date' => '2019-05-22 17:23:08', - 'enrollment_opens_date' => '2019-05-22 17:22:05', - 'enrollment_closes_date' => '2019-05-22 17:22:08', - ) - ); - - $request->set_body_params( $sample_course_args ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 201, $response->get_status() ); - - $res_data = $response->get_data(); - - $this->assertEquals( esc_url_raw( $sample_course_args['audio_embed'] ), $res_data['audio_embed'] ); - $this->assertEquals( esc_url_raw( $sample_course_args['video_embed'] ), $res_data['video_embed'] ); - $this->assertEquals( $sample_course_args['capacity_enabled'], $res_data['capacity_enabled'] ); - $this->assertEquals( do_shortcode( $sample_course_args['capacity_message'] ), $res_data['capacity_message']['rendered'] ); - $this->assertEquals( $sample_course_args['capacity_limit'], $res_data['capacity_limit'] ); - - // Dates. - $this->assertEquals( $sample_course_args['access_opens_date'], $res_data['access_opens_date'] ); - $this->assertEquals( $sample_course_args['access_closes_date'], $res_data['access_closes_date'] ); - $this->assertEquals( $sample_course_args['enrollment_opens_date'], $res_data['enrollment_opens_date'] ); - $this->assertEquals( $sample_course_args['enrollment_closes_date'], $res_data['enrollment_closes_date'] ); - } - - /** - * Test creating a single course with taxonomies - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_with_taxonomies() { - - wp_set_current_user( $this->user_allowed ); - $taxonomies = array( - 'categories' => array( - 1, - 2, - 3, - ), - 'tags' => array( - 6, - 4, - 8, - ), - 'difficulties' => array( - 9, - ), - 'tracks' => array( - 7, - 5, - 6, - ), - ); - - $course_args = array_merge( - $this->sample_course_args, - $taxonomies - ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - // Terms have not ben created, I expect the course is created with empty taxonomies. - $this->assertEquals( 201, $response->get_status() ); - - $res_data = $response->get_data(); - - foreach ( $taxonomies as $tax => $tid ) { - $this->assertEquals( array(), $res_data[ $tax ] ); - } - - // let's create the terms. - $taxonomies = array( - 'categories' => $this->factory()->term->create_many( - 3, - array( - 'taxonomy' => 'course_cat', - ) - ), - 'tags' => $this->factory()->term->create_many( - 3, - array( - 'taxonomy' => 'course_tag', - ) - ), - 'difficulties' => $this->factory()->term->create_many( - 1, - array( - 'taxonomy' => 'course_difficulty', - ) - ), - 'tracks' => $this->factory()->term->create_many( - 3, - array( - 'taxonomy' => 'course_track', - ) - ), - ); - - $course_args = array_merge( - $this->sample_course_args, - $taxonomies - ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - // Terms have been created, I expect the course is created with taxonomies set. - $this->assertEquals( 201, $response->get_status() ); - - $res_data = $response->get_data(); - - foreach ( $taxonomies as $tax => $tid ) { - $this->assertEquals( $tid, $res_data[ $tax ] ); - } - } - - /** - * Test creating a single course with taxonomies - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_with_prerequisites() { - wp_set_current_user( $this->user_allowed ); - - $course_args = array_merge( - $this->sample_course_args, - array( - 'prerequisite' => 2, - 'prerequisite_track' => 5, - ) - ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - $res_data = $response->get_data(); - - // Courses with id 2 do not exist, hence I expect an empty prerequisite property. - $this->assertEquals( 0, $res_data['prerequisite'] ); - // Tracks with id 5 do not exist, hence I expect an empty prerequisite track. - $this->assertEquals( 0, $res_data['prerequisite_track'] ); - - $course = new LLMS_Course( $res_data['id'] ); - - // Check that the created course's has_prerequisite is set accordingly. - $this->assertEquals( 'no', $course->get( 'has_prerequisite' ) ); - - // Create a course and a track. - $prereq_course = $this->factory->course->create( array( 'sections' => 0 ) ); - $prereq_track = $this->factory()->term->create( - array( - 'taxonomy' => 'course_track', - ) - ); - - $course_args = array_merge( - $this->sample_course_args, - array( - 'prerequisite' => $prereq_course, - 'prerequisite_track' => $prereq_track, - ) - ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - $res_data = $response->get_data(); - - // I expect prerequisites now match. - $this->assertEquals( $prereq_course, $res_data['prerequisite'] ); - $this->assertEquals( $prereq_track, $res_data['prerequisite_track'] ); - - $course = new LLMS_Course( $res_data['id'] ); - - // Check that the created course's has_prerequisite is set accordingly. - $this->assertEquals( 'yes', $course->get( 'has_prerequisite' ) ); - - } - - /** - * Test course "periods". - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_and_periods() { - - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $course_args = array_merge( - $this->sample_course_args, - array( - 'access_opens_date' => '2019-05-22 17:20:05', - 'enrollment_closes_date' => '2019-05-22 17:22:05', - ) - ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - $course = new LLMS_Course( $res_data['id'] ); - - // Check that the created course's 'time_period' is enabled, since one of access_opens_date and access_closes_date is set. - $this->assertEquals( 'yes', $course->get( 'time_period' ) ); - // Check that the created course's 'enrollment_period' is enabled, since one of enrollment_opens_date and enrollment_closes_date is set. - $this->assertEquals( 'yes', $course->get( 'enrollment_period' ) ); - - $course_args = array_merge( - $this->sample_course_args, - array( - 'access_closes_date' => '2019-05-22 17:20:05', - 'enrollment_opens_date' => '2019-05-22 17:22:05', - ) - ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - $course = new LLMS_Course( $res_data['id'] ); - - // Check that the created course's 'time_period' is enabled, since one of access_opens_date and access_closes_date is set. - $this->assertEquals( 'yes', $course->get( 'time_period' ) ); - // Check that the created course's 'enrollment_period' is enabled, since one of enrollment_opens_date and enrollment_closes_date is set. - $this->assertEquals( 'yes', $course->get( 'enrollment_period' ) ); - - $request->set_body_params( $this->sample_course_args ); - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - $course = new LLMS_Course( $res_data['id'] ); - - // Check that the created course's 'time_period' is not enabled, since none of access_opens_date and access_closes_date is set. - $this->assertEquals( 'no', $course->get( 'time_period' ) ); - // Check that the created course's 'enrollment_period' is not enabled, since none of enrollment_opens_date and enrollment_closes_date is set. - $this->assertEquals( 'no', $course->get( 'enrollment_period' ) ); - - } - - /** - * Test create course with raw properties. - * Check textual properties are still set when supplying them as 'raw'. - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_and_raws() { - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $course_raw_messages = array( - 'length' => array( - 'raw' => 'Length raw message', - ), - 'restricted_message' => array( - 'raw' => 'Restricted raw message', - ), - 'capacity_message' => array( - 'raw' => 'Capacity raw message', - ), - 'access_opens_message' => array( - 'raw' => 'Access opens raw message', - ), - 'access_closes_message' => array( - 'raw' => 'Access closes raw message', - ), - 'enrollment_opens_message' => array( - 'raw' => 'Enrollment opens raw message', - ), - 'enrollment_closes_message' => array( - 'raw' => 'Enrollment closess raw message', - ), - ); - - $course_args = array_merge( - $this->sample_course_args, - $course_raw_messages - ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - $res_data = $response->get_data(); - - foreach ( $course_raw_messages as $property => $content ) { - $this->assertEquals( $content['raw'], $res_data[ $property ]['raw'] ); - } - - } - - /** - * Test producing bad request error when creating a single course. - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_bad_request() { - - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $course_args = $this->sample_course_args; - - // Creating a course passing an id produces a bad request. - $course_args['id'] = '123'; - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - - // create a course without title. - $course_args = $this->sample_course_args; - unset( $course_args['title'] ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - - // create a course without content. - $course_args = $this->sample_course_args; - unset( $course_args['content'] ); - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - - // status param must respect the item scehma, hence one of "publish" "pending" "draft" "auto-draft" "future" "private" "trash". - $course_args = $this->sample_course_args; - $status = array_merge( array_keys( get_post_statuses() ), array( 'future', 'trash', 'auto-draft' ) ); - $course_args['status'] = $status[0] . rand() . 'not_in_enum'; - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - - // catalog_visibility param must respect the item schema, hence one of array_keys( llms_get_product_visibility_options() ). - $course_args = $this->sample_course_args; - $catalog_visibility = array_keys( llms_get_product_visibility_options() ); - $course_args['catalog_visibility'] = $catalog_visibility[0] . rand() . 'not_in_enum'; - - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - - } - - /** - * Test creating single course without permissions. - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_without_permissions() { - - wp_set_current_user( 0 ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $request->set_body_params( $this->sample_course_args ); - $response = $this->server->dispatch( $request ); - - // Unhauthorized. - $this->assertEquals( 401, $response->get_status() ); - - } - - /** - * Test forbidden single course creation. - * - * @since 1.0.0-beta.1 - */ - public function test_create_course_forbidden() { - - wp_set_current_user( $this->user_forbidden ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - $request->set_body_params( $this->sample_course_args ); - $response = $this->server->dispatch( $request ); - - // Forbidden. - $this->assertEquals( 403, $response->get_status() ); - - } - - - /** - * Test updating a course. - * - * @since 1.0.0-beta.1 - */ - public function test_update_course() { - - // create a course first. - $course = $this->factory->course->create_and_get(); - - wp_set_current_user( $this->user_allowed ); - - // update. - $update_data = array( - 'title' => 'A TITLE UPDTAED', - 'content' => '

CONTENT UPDATED

', - 'date_created' => '2019-05-22 17:22:05', - 'status' => 'draft', - ); - - $request = new WP_REST_Request( 'POST', $this->route . '/' . $course->get( 'id' ) ); - $request->set_body_params( $update_data ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - - $this->assertEquals( $update_data['title'], $res_data['title']['raw'] ); - $this->assertEquals( $update_data['title'], $res_data['title']['rendered'] ); - $this->assertEquals( rtrim( apply_filters( 'the_content', $update_data['content'] ), "\n" ), rtrim( $res_data['content']['rendered'], "\n" ) ); - $this->assertEquals( $update_data['date_created'], $res_data['date_created'] ); - $this->assertEquals( $update_data['status'], $res_data['status'] ); - - } - - /** - * Test updating a nonexistent course. - * - * @since 1.0.0-beta.1 - */ - public function test_update_nonexistent_course() { - - wp_set_current_user( $this->user_allowed ); - - $id = 48987456; - - $request = new WP_REST_Request( 'POST', $this->route . '/' . $id ); - $course_args = $this->sample_course_args; - $request->set_body_params( $course_args ); - $response = $this->server->dispatch( $request ); - $res_data = $response->get_data(); - - // Not found. - $this->assertEquals( 404, $response->get_status() ); - - } - - /** - * Test forbidden single course update. - * - * @since 1.0.0-beta.1 - */ - public function test_update_forbidden_course() { - - // create a course first. - $course = $this->factory->course->create_and_get(); - - wp_set_current_user( $this->user_forbidden ); - - $request = new WP_REST_Request( 'POST', $this->route . '/' . $course->get( 'id' ) ); - - $request->set_body_params( $this->sample_course_args ); - $response = $this->server->dispatch( $request ); - - // Bad request. - $this->assertEquals( 403, $response->get_status() ); - - } - - /** - * Test single course update without authorization. - * - * @since 1.0.0-beta.1 - */ - public function test_update_course_without_authorization() { - - // create a course first. - $course = $this->factory->course->create_and_get(); - - wp_set_current_user( 0 ); - - $request = new WP_REST_Request( 'POST', $this->route . '/' . $course->get( 'id' ) ); - - $request->set_body_params( $this->sample_course_args ); - $response = $this->server->dispatch( $request ); - - // Unauthorized. - $this->assertEquals( 401, $response->get_status() ); - - } - - /** - * Test deleting a single course. - * - * @since 1.0.0-beta.1 - */ - public function test_delete_course() { - - wp_set_current_user( $this->user_allowed ); - - // create a course first. - $course = $this->factory->course->create_and_get(); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $course->get( 'id' ) ); - $request->set_param( 'force', true ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 204, $response->get_status() ); - // empty body. - $this->assertEquals( null, $response->get_data() ); - - // Cannot find just deleted post. - $this->assertFalse( get_post_status( $course->get( 'id' ) ) ); - - } - - /** - * Test trashing a single course. - * - * @since 1.0.0-beta.1 - */ - public function test_trash_course() { - - wp_set_current_user( $this->user_allowed ); - - // create a course first. - $course = $this->factory->course->create_and_get(); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $course->get( 'id' ) ); - $request->set_param( 'force', false ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - // Non empty body. - $this->assertTrue( ! empty( $res_data ) ); - // Deleted post status should be 'trash'. - $this->assertEquals( 'trash', get_post_status( $course->get( 'id' ) ) ); - // check the trashed post returned into the response is the correct one. - $this->assertEquals( $course->get( 'id' ), $res_data['id'] ); - // check the trashed post returned into the response has the correct status 'trash'. - $this->assertEquals( 'trash', $res_data['status'] ); - - // Trash again I expect the same as above. - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $course->get( 'id' ) ); - $request->set_param( 'force', false ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - // Non empty body. - $this->assertTrue( ! empty( $res_data ) ); - // Deleted post status should be 'trash'. - $this->assertEquals( 'trash', get_post_status( $course->get( 'id' ) ) ); - // check the trashed post returned into the response is the correct one. - $this->assertEquals( $course->get( 'id' ), $res_data['id'] ); - // check the trashed post returned into the response has the correct status 'trash'. - $this->assertEquals( 'trash', $res_data['status'] ); - - } - - /** - * Test deleting a nonexistent single course. - * - * @since 1.0.0-beta.1 - */ - public function test_delete_nonexistent_course() { - - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/747484940' ); - - $response = $this->server->dispatch( $request ); - - // Post not found, so it's "deleted". - $this->assertEquals( 204, $response->get_status() ); - $this->assertEquals( '', $response->get_data() ); - } - - /** - * Test getting bad request response when deleting a course. - * - * @since 1.0.0-beta.1 - */ - public function test_delete_bad_request_course() { - - wp_set_current_user( $this->user_allowed ); - - // create a course first. - $course = $this->factory->course->create_and_get(); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $course->get( 'id' ) ); - $request->set_param( 'force', 'bad_parameter_value' ); - $response = $this->server->dispatch( $request ); - - // Bad request because of a bad parameter. - $this->assertEquals( 400, $response->get_status() ); - - } - - /** - * Test single course update without authorization. - * - * @since 1.0.0-beta.1 - */ - public function test_delete_forbidden_course() { - - // create a course first. - $course = $this->factory->course->create_and_get(); - - wp_set_current_user( $this->user_forbidden ); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $course->get( 'id' ) ); - - $response = $this->server->dispatch( $request ); - - // Forbidden. - $this->assertEquals( 403, $response->get_status() ); - - } - - /** - * Test single course deletion without authorization. - * - * @since 1.0.0-beta.1 - */ - public function test_delete_course_without_authorization() { - - // create a course first. - $course = $this->factory->course->create_and_get(); - - wp_set_current_user( 0 ); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $course->get( 'id' ) ); - - $response = $this->server->dispatch( $request ); - - // Unauthorized. - $this->assertEquals( 401, $response->get_status() ); - - } - - - /** - * Test list course content. - * - * @since 1.0.0-beta.1 - * - * @todo test order and orderby - */ - public function test_get_course_content() { - - wp_set_current_user( $this->user_allowed ); - - // create 1 course with no sections. - $course = $this->factory->course->create( - array( - 'sections' => 0, - ) - ); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course . '/content' ) ); - - // We have no sections for this course so we expect a 404. - $this->assertEquals( 404, $response->get_status() ); - - // create 1 course with 5 sections. - $course = $this->factory->course->create( - array( - 'sections' => 5, - ) - ); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course . '/content' ) ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - $this->assertEquals( 5, count( $res_data ) ); - - } - - /** - * Test list course content. - * - * @since 1.0.0-beta.1 - * - * @todo test order and orderby - */ - public function test_get_course_enrollments() { - - wp_set_current_user( $this->user_allowed ); - - // create 1 course. - $course = $this->factory->course->create(); - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course . '/enrollments' ) ); - - // We have no students enrolled for this course so we expect a 404. - $this->assertEquals( 404, $response->get_status() ); - - // create 5 students and enroll them. - $student_ids = $this->factory->student->create_and_enroll_many( 5, $course ); - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $course . '/enrollments' ) ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - $this->assertEquals( 5, count( $res_data ) ); - - // Filter by student_id. - $request = new WP_REST_Request( 'GET', $this->route . '/' . $course . '/enrollments' ); - $request->set_param( 'student', "$student_ids[0]" ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - $this->assertEquals( 1, count( $res_data ) ); - $this->assertEquals( $student_ids[0], $res_data[0]['student_id'] ); - - } - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-enrollments.php b/tests/unit-tests/server/class-llms-rest-test-enrollments.php deleted file mode 100644 index 53434849..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-enrollments.php +++ /dev/null @@ -1,517 +0,0 @@ -[\d]+)/enrollments'; - - /** - * Consider dates equal for +/- 2 mins - * - * @var integer - */ - private $date_delta = 120; - - /** - * Setup our test server, endpoints, and user info. - */ - public function setUp() { - parent::setUp(); - - global $wpdb; - $wpdb->query( "DELETE FROM {$wpdb->prefix}lifterlms_user_postmeta" ); - - $this->endpoint = new LLMS_REST_Enrollments_Controller(); - - $this->user_allowed = $this->factory->user->create( - array( - 'role' => 'administrator', - ) - ); - - $this->user_forbidden = $this->factory->user->create( - array( - 'role' => 'subscriber', - ) - ); - } - - - /** - * Test route registration. - * - * @since 1.0.0-beta.1 - */ - public function test_register_routes() { - - $routes = $this->server->get_routes(); - $this->assertArrayHasKey( $this->route, $routes ); - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)', $routes ); - - } - - /** - * Test list student enrollments. - * - * @since 1.0.0-beta.1 - */ - public function test_get_enrollments() { - - wp_set_current_user( $this->user_allowed ); - - // create enrollments. - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - // Create new courses. - $course_ids = $this->factory->post->create_many( 5, array( 'post_type' => 'course' ) ); - - foreach ( $course_ids as $course_id ) { - // Enroll Student in newly created course. - llms_enroll_student( $user_id, $course_id, 'test_get_enrollments' ); - } - - $request = new WP_REST_Request( 'GET', $this->parse_route($user_id) ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $res_data = $response->get_data(); - - // Expect 5 enrollments. - $this->assertEquals( 5, count( $res_data ) ); - - // Check enrollments post_id. - $i = 0; - foreach ( $res_data as $enrollment ) { - $this->assertEquals( $course_ids[$i], $res_data[$i++]['post_id'] ); - } - } - - /** - * Test list student enrollments filter by post_id. - * - * @since 1.0.0-beta.1 - */ - public function test_get_enrollments_filter_post() { - - wp_set_current_user( $this->user_allowed ); - - // create enrollments. - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - // Create new courses. - $course_ids = $this->factory->post->create_many( 10, array( 'post_type' => 'course' ) ); - - $j = 0; - $courses = array(); - foreach ( $course_ids as $course_id ) { - if ( 0 === ( $j++ % 2 ) ) { - // Enroll Student in newly created course. - llms_enroll_student( $user_id, $course_id, 'test_filter_enrollments' ); - $courses[] = $course_id; - } - } - - $request = new WP_REST_Request( 'GET', $this->parse_route($user_id) ); - $request->set_param( 'post', "$courses[1],$courses[2]" ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $res_data = $response->get_data(); - - // Expect 2 enrollments. - $this->assertEquals( 2, count( $res_data ) ); - - // Check enrollments post_id. - $i = 0; - foreach ( $res_data as $enrollment ) { - $this->assertEquals( $courses[$i+1], $res_data[$i++]['post_id'] ); - } - - } - - /** - * Test getting enrollments without permission. - * - * @since 1.0.0-beta.1 - */ - public function test_get_enrollments_without_permission() { - - wp_set_current_user( 0 ); - - // Setup course. - $this->factory->course->create(); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->parse_route( 1 ) ) ); - - // Check we don't have permissions to make this request. - $this->assertEquals( 401, $response->get_status() ); - - } - - /** - * Test getting enrollments: forbidden request. - * - * @since 1.0.0-beta.1 - */ - public function test_get_enrollments_forbidden() { - - wp_set_current_user( $this->user_forbidden ); - - // Setup course. - $this->factory->course->create(); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->parse_route( 1 ) ) ); - - // Check we're not allowed to get results. - $this->assertEquals( 403, $response->get_status() ); - - } - - /** - * Test get single student enrollment - * - * @since 1.0.0-beta.1 - */ - public function test_get_enrollment() { - - wp_set_current_user( $this->user_allowed ); - - // create enrollment. - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - // Create new courses. - $course_id = $this->factory->post->create_many( 2, array( 'post_type' => 'course' ) ); - $date_now = date( 'Y-m-d H:i:s' ); - llms_enroll_student( $user_id, $course_id[0], 'test_get_enrollment' ); - - $request = new WP_REST_Request( 'GET', $this->parse_route($user_id) . '/' . $course_id[0] ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $res_data = $response->get_data(); - - // Check: - $this->assertEquals( $user_id, $res_data['student_id'] ); - $this->assertEquals( $course_id[0], $res_data['post_id'] ); - $this->assertEquals( 'enrolled', $res_data['status'] ); - $this->assertEquals( $date_now, $res_data['date_created'], '', $this->date_delta ); - $this->assertEquals( $res_data['date_created'], $res_data['date_updated'] ); - - $student = new LLMS_Student($user_id); - $this->assertEquals( $res_data['status'], $student->get_enrollment_status( $course_id[0] ) ); - $this->assertEquals( $res_data['date_created'], $student->get_enrollment_date( $course_id[0], 'enrolled', 'Y-m-d H:i:s' ) ); - $this->assertEquals( $res_data['date_updated'], $student->get_enrollment_date( $course_id[0], 'updated', 'Y-m-d H:i:s' ) ); - - } - - /** - * Test getting enrollment without permission. - * - * @since 1.0.0-beta.1 - */ - public function test_get_enrollment_without_permission() { - - wp_set_current_user( $this->user_allowed ); - - // create enrollment. - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - // Create new courses. - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - llms_enroll_student( $user_id, $course_id, 'test_get_enrollment_noperm' ); - - wp_set_current_user( 0 ); - - // Setup course. - $this->factory->course->create(); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->parse_route( $user_id ) . '/' . $course_id ) ); - - // Check we don't have permissions to make this request. - $this->assertEquals( 401, $response->get_status() ); - - } - - /** - * Test getting enrollment: forbidden request. - * - * @since 1.0.0-beta.1 - */ - public function test_get_enrollment_forbidden() { - - wp_set_current_user( $this->user_forbidden ); - - // create enrollment. - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - // Create new courses. - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - llms_enroll_student( $user_id, $course_id, 'test_get_enrollment_forbidden' ); - - // Setup course. - $this->factory->course->create(); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->parse_route( $user_id ) . '/' . $course_id ) ); - - // Check we're not allowed to get results. - $this->assertEquals( 403, $response->get_status() ); - - } - - /** - * Test create enrollment. - * - * @since 1.0.0-beta.1 - */ - public function test_create_enrollment() { - - wp_set_current_user( $this->user_allowed ); - - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - $request = new WP_REST_Request( 'POST', $this->parse_route( $user_id ) . '/' . $course_id ); - $date_now = date( 'Y-m-d H:i:s' ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 201, $response->get_status() ); - $res_data = $response->get_data(); - - // Check: - $this->assertEquals( $user_id, $res_data['student_id'] ); - $this->assertEquals( $course_id, $res_data['post_id'] ); - $this->assertEquals( 'enrolled', $res_data['status'] ); - $this->assertEquals( $date_now, $res_data['date_created'], '', $this->date_delta ); - $this->assertEquals( $res_data['date_created'], $res_data['date_updated'] ); - - } - - /** - * Test producing bad request error when creating a single enrollment. - * - * @since 1.0.0-beta.1 - */ - public function test_create_enrollment_bad_request() { - - wp_set_current_user( $this->user_allowed ); - - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - // Bad request: post is not a enrollable. - $lesson_id = $this->factory->post->create( array( 'post_type' => 'lesson' ) ); - $request = new WP_REST_Request( 'POST', $this->parse_route( $user_id ) . '/' . $lesson_id ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 400, $response->get_status() ); - - } - - /** - * Test update enrollment status. - * - * @since 1.0.0-beta.1 - */ - public function test_update_enrollment_status() { - - wp_set_current_user( $this->user_allowed ); - - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - // Enroll Student in newly created course/membership - llms_enroll_student( $user_id, $course_id, 'test_update_status' ); - - sleep(1); //<- to be sure the new status is subsequent the one set on creation. - $request = new WP_REST_Request( 'PATCH', $this->parse_route( $user_id ) . '/' . $course_id ); - $request->set_body_params( array( - 'status' => 'expired' - ) ); - - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $res_data = $response->get_data(); - - // Check: - $this->assertEquals( $user_id, $res_data['student_id'] ); - $this->assertEquals( $course_id, $res_data['post_id'] ); - $this->assertEquals( 'expired', $res_data['status'] ); - $student = new LLMS_Student( $user_id ); - $this->assertEquals( $res_data['status'], $student->get_enrollment_status( $course_id, false ) ); - - } - - /** - * Test update enrollment creation date. - * - * @since 1.0.0-beta.1 - */ - public function test_update_enrollment_creation_date() { - - wp_set_current_user( $this->user_allowed ); - - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - // Enroll Student in newly created course/membership - llms_enroll_student( $user_id, $course_id, 'test_update_creation' ); - - $request = new WP_REST_Request( 'PATCH', $this->parse_route( $user_id ) . '/' . $course_id ); - - $new_date = date( 'Y-m-d H:i:s', strtotime('+1 year') ); - - $request->set_body_params( array( - 'date_created' => $new_date - ) ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - $res_data = $response->get_data(); - - // Check: - $this->assertEquals( $user_id, $res_data['student_id'] ); - $this->assertEquals( $course_id, $res_data['post_id'] ); - $this->assertEquals( $new_date, $res_data['date_created'] ); - - $student = new LLMS_Student( $user_id ); - $this->assertEquals( $res_data['date_created'], $student->get_enrollment_date( $course_id, 'enrolled', 'Y-m-d H:i:s' ) ); - - } - - /** - * Test producing 404 request errort. - * - * @since 1.0.0-beta.1 - */ - public function test_enrollment_not_found() { - - wp_set_current_user( $this->user_allowed ); - - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - - /* create */ - // User id doesn't exist. - $request = new WP_REST_Request( 'POST', $this->parse_route( $user_id . '1234' ) . '/' . $course_id ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 404, $response->get_status() ); - - // Course id doesn't exist. - $request = new WP_REST_Request( 'POST', $this->parse_route( $user_id ) . '/' . $course_id . '1245' ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 404, $response->get_status() ); - - /* Update and Retrieve single */ - foreach ( array( 'PATCH', 'GET' ) as $method ) { - // User id doesn't exist. - $request = new WP_REST_Request( $method, $this->parse_route( $user_id . '1234' ) . '/' . $course_id ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 404, $response->get_status() ); - - // Course id doesn't exist. - $request = new WP_REST_Request( $method, $this->parse_route( $user_id ) . '/' . $course_id . '1245' ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 404, $response->get_status() ); - - // User id and course id exist but the enrollment is not found - $request = new WP_REST_Request( $method, $this->parse_route( $user_id ) . '/' . $course_id ); - $response = $this->server->dispatch( $request ); - $this->assertEquals( 404, $response->get_status() ); - } - - } - - /** - * Test deleting a single enrollment. - * - * @since 1.0.0-beta.1 - */ - public function test_delete_enrollment() { - - wp_set_current_user( $this->user_allowed ); - - // create an enrollment, we need a student and a course/membership. - $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - // Create new course - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - - // Enroll Student in newly created course/membership - llms_enroll_student( $user_id, $course_id, 'test_delete' ); - - // Delete user's enrollment - $request = new WP_REST_Request( 'DELETE', $this->parse_route($user_id) . '/' . $course_id ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 204, $response->get_status() ); - // Student should not be enrolled in course - $this->assertFalse( llms_is_user_enrolled( $user_id, $course_id ) ); - - } - - /** - * Test protected enrollment_exists method. - * - * @since 1.0.0-beta.1 - */ - public function test_enrollment_exists() { - $error_code = 'llms_rest_not_found'; - - $result = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'enrollment_exists', array( 789, 879 ) ); - // enrollment doesn't exist because both student and course/membership do not exist. - $this->assertWPError( $result ); - - $student_id = $this->factory->user->create( array( 'role' => 'student' ) ); - $result = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'enrollment_exists', array( $student_id, 879 ) ); - // enrollment doesn't exist because course/membership do not exist. - $this->assertWPError( $result ); - - // Create new course. - $course_id = $this->factory->post->create( array( 'post_type' => 'course' ) ); - $result = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'enrollment_exists', array( $student_id, $course_id ) ); - // enrollment doesn't exist because the $student has not been enrolled yet. - $this->assertWPError( $result ); - $this->assertWPErrorCodeEquals( $error_code, $result ); - - // Enroll Student. - llms_enroll_student( $student_id, $course_id, 'test_exists' ); - $result = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'enrollment_exists', array( $student_id, $course_id ) ); - // enrollment exists because the $student has been enrolled yet. - $this->assertTrue( $result ); - - // Unenroll Student. - llms_unenroll_student( $student_id, $course_id ); - $result = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'enrollment_exists', array( $student_id, $course_id ) ); - // enrollment still exists because the $student has been unenrolled but not deleted - $this->assertTrue( $result ); - - // Delete student's enrollment - llms_delete_student_enrollment( $student_id, $course_id ); - $result = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'enrollment_exists', array( $student_id, $course_id ) ); - // enrollment still exists because the $student has been unenrolled but not deleted - $this->assertWPError( $result ); - $this->assertWPErrorCodeEquals( $error_code, $result ); - } - - private function parse_route( $student_id ) { - return str_replace( '(?P[\d]+)', $student_id, $this->route ); - } - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-instructors-controllers.php b/tests/unit-tests/server/class-llms-rest-test-instructors-controllers.php deleted file mode 100644 index d2f722fb..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-instructors-controllers.php +++ /dev/null @@ -1,251 +0,0 @@ -user_admin = $this->factory->user->create( array( 'role' => 'administrator', ) ); - $this->user_subscriber = $this->factory->user->create( array( 'role' => 'subscriber', ) ); - $this->user_instructor = $this->factory->user->create( array( 'role' => 'instructor', ) ); - $this->user_assistant = $this->factory->user->create( array( 'role' => 'instructors_assistant', ) ); - $asst = llms_get_instructor( $this->user_assistant )->add_parent( $this->user_instructor ); - $this->endpoint = new LLMS_REST_Instructors_Controller(); - - } - - /** - * Test route registration - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_register_routes() { - - $routes = $this->server->get_routes(); - $this->assertArrayHasKey( $this->route, $routes ); - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)', $routes ); - - } - - /** - * Ensure all collection parameters have been registered. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_collection_params() { - - $params = $this->endpoint->get_collection_params(); - $this->assertArrayHasKey( 'context', $params ); - $this->assertArrayHasKey( 'page', $params ); - $this->assertArrayHasKey( 'per_page', $params ); - $this->assertArrayHasKey( 'order', $params ); - $this->assertArrayHasKey( 'orderby', $params ); - $this->assertArrayHasKey( 'include', $params ); - $this->assertArrayHasKey( 'roles', $params ); - $this->assertArrayHasKey( 'post_in', $params ); - $this->assertArrayHasKey( 'post_not_in', $params ); - - } - - /** - * Test the item schema. - * - * @since 1.0.0-beta.1 - * - * @return [type] - */ - public function test_get_item_schema() { - - $schema = $this->endpoint->get_item_schema(); - - $this->assertEquals( 'instructor', $schema['title'] ); - - $props = array( - 'id', - 'username', - 'name', - 'first_name', - 'last_name', - 'email', - 'url', - 'description', - 'nickname', - 'registered_date', - 'roles', - 'password', - 'billing_address_1', - 'billing_address_2', - 'billing_city', - 'billing_state', - 'billing_postcode', - 'billing_country', - 'avatar_urls', - ); - - $this->assertEquals( $props, array_keys( $schema['properties'] ) ); - - $this->assertEquals( array( 'instructor' ), $schema['properties']['roles']['default'] ); - - $schema = $this->endpoint->get_item_schema(); - update_option( 'show_avatars', '' ); - $this->assertFalse( array_key_exists( 'avatar_urls', array_keys( $schema['properties'] ) ) ); - - update_option( 'show_avatars', 1 ); - - } - - /** - * Test the get_object method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_object() { - - $id = $this->factory->user->create( array( 'role' => 'instructor' ) ); - - // Good. - $instructor = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'get_object', array( $id ) ); - $this->assertTrue( is_a( $instructor, 'LLMS_Instructor' ) ); - - // 404. - $error_404 = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'get_object', array( $id + 1 ) ); - $this->assertIsWPError( $error_404 ); - $this->assertWPErrorCodeEquals( 'llms_rest_not_found', $error_404 ); - - } - - // public function test_get_items_auth() {} - // public function test_get_items_exclude() {} - // public function test_get_items_include() {} - // public function test_get_items_orderby_id() {} - // public function test_get_items_orderby_email() {} - // public function test_get_items_orderby_name() {} - // public function test_get_items_orderby_registered_date() {} - // public function test_get_items_pagination() {} - // public function test_get_items_filter_by_posts() {} - // public function test_get_items_filter_by_roles() {} - - public function test_create_item_missing_required() { - - $res = $this->perform_mock_request( 'POST', $this->route ); - $this->assertResponseStatusEquals( 400, $res ); - $this->assertResponseCodeEquals( 'rest_missing_callback_param', $res ); - $this->assertResponseMessageEquals( 'Missing parameter(s): email', $res ); - - } - - public function test_create_item_auth_errors() { - - // Unauthorized user. - wp_set_current_user( null ); - $res = $this->perform_mock_request( 'POST', $this->route, array( 'email' => 'mock@mock.mock' ) ); - $this->assertResponseStatusEquals( 401, $res ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $res ); - - // Forbidden user. - wp_set_current_user( $this->user_subscriber ); - $res = $this->perform_mock_request( 'POST', $this->route, array( 'email' => 'mock@mock.mock' ) ); - $this->assertResponseStatusEquals( 403, $res ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - - } - - public function test_create_item_as_instructor() { - - // Instructor can only create assistants. - wp_set_current_user( $this->user_instructor ); - $res = $this->perform_mock_request( 'POST', $this->route, array( 'email' => 'mock@mock.mock', ) ); - $this->assertResponseStatusEquals( 403, $res ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - $this->assertResponseMessageEquals( 'You are not allowed to give users this role.', $res ); - - // Okay. - $res = $this->perform_mock_request( 'POST', $this->route, array( - 'email' => 'mock@mock.mock', - 'roles' => 'instructors_assistant', - ) ); - $this->assertResponseStatusEquals( 201, $res ); - - } - - public function test_create_item_success() { - - wp_set_current_user( $this->user_admin ); - $args = array( - 'email' => 'jamief@mockinstructor.tld', - 'first_name' => 'Jamie', - 'last_name' => 'Fitzgerald', - 'name' => 'Jamie Fitzgerald', - 'nickname' => 'JamieF1932', - 'username' => 'jamief', - 'url' => 'http://jamief.geocities.com', - 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', - 'billing_address_1' => '123 Some Street', - 'billing_address_2' => 'Suite A', - 'billing_city' => 'Some City', - 'billing_state' => 'NH', - 'billing_postcode' => '32319', - 'billing_country' => 'USA', - ); - $res = $this->perform_mock_request( 'POST', $this->route, $args ); - - $this->assertResponseStatusEquals( 201, $res ); - - $data = $res->get_data(); - foreach ( $args as $key => $expected ) { - $this->assertEquals( $expected, $data[ $key ] ); - } - - $this->assertEquals( array( 'instructor' ), $data['roles'] ); - - $this->assertArrayHasKey( 'id', $data ); - $this->assertArrayHasKey( 'avatar_urls', $data ); - $this->assertArrayHasKey( 'registered_date', $data ); - - $this->assertArrayHasKey( 'Location', $res->get_headers() ); - - } - - // public function test_get_item_auth() {} - // public function test_get_item_not_found() {} - // public function test_get_item_success() {} - - // public function test_update_item_auth() {} - // public function test_update_item_errors() {} - // public function test_update_item_success() {} - - // public function test_delete_item_auth() {} - // public function test_delete_item_success() {} - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-sections.php b/tests/unit-tests/server/class-llms-rest-test-sections.php deleted file mode 100644 index 110b4dd0..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-sections.php +++ /dev/null @@ -1,348 +0,0 @@ -user_allowed = $this->factory->user->create( - array( - 'role' => 'administrator', - ) - ); - - $this->user_forbidden = $this->factory->user->create( - array( - 'role' => 'subscriber', - ) - ); - - $this->sample_section_args = array( - 'title' => array( - 'rendered' => 'Introduction', - 'raw' => 'Introduction', - ), - ); - - global $wpdb; - $wpdb->delete( $wpdb->prefix . 'posts', array( 'post_type' => $this->post_type ) ); - - $this->endpoint = new LLMS_REST_Sections_Controller(); - } - - - /** - * Test route registration. - * - * @since 1.0.0-beta.1 - */ - public function test_register_routes() { - - $routes = $this->server->get_routes(); - $this->assertArrayHasKey( $this->route, $routes ); - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)', $routes ); - - // Child lessons. - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)/content', $routes ); - } - - /** - * Test list sections. - * - * @since 1.0.0-beta.1 - */ - public function test_get_sections() { - - wp_set_current_user( $this->user_allowed ); - - // create 3 courses. - $courses = $this->factory->course->create_many( 3, array( 'sections' => 5, 'lessons' => 0 ) ); - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route ) ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - $this->assertEquals( 10, count( $res_data ) ); // default per_page is 10. - - $headers = $response->get_headers(); - $this->assertEquals( 15, $headers['X-WP-Total'] ); - $this->assertEquals( 2, $headers['X-WP-TotalPages'] ); - - $i = 0; - // Check retrieved sections are the same as the generated ones. - foreach ( $courses as $course ) { - $course_obj = new LLMS_Course( $course ); - $sections = $course_obj->get_sections(); - - // Easy sequential check as sections are by default oredered by id. - $j = 0; - foreach ( $sections as $section ) { - $res_section = $res_data[ $i + $j ]; - $this->llms_posts_fields_match( $section, $res_section ); - $j++; - } - - $i++; - } - - } - - - /** - * Test create a single section. - * - * @since 1.0.0-beta.1 - */ - public function test_create_section() { - - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - - // create a course. - $course_id = $this->factory->course->create( array( 'sections' => 0 ) ); - - $section_args = $this->sample_section_args; - $section_args['parent_id'] = $course_id; - - $request->set_body_params( $section_args ); - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 201, $response->get_status() ); - - $course = new LLMS_Course( $course_id ); - $sections = $course->get_sections(); // returns an array of one element. - - $res_data = $response->get_data(); - - // Test the created section and the response are equal - $this->llms_posts_fields_match( $sections[0], $res_data ); - $this->assertEquals( $section_args['title']['rendered'], $res_data['title']['rendered'] ); - - } - - /** - * Test producing bad request error when creating a single section. - * - * @since 1.0.0-beta.1 - */ - public function test_create_section_bad_request() { - - wp_set_current_user( $this->user_allowed ); - - $request = new WP_REST_Request( 'POST', $this->route ); - // create a course. - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - $post = $this->factory->post->create(); - - // create a section without parent_id. - $section_args = $this->sample_section_args; - - $request->set_body_params( $section_args ); - $response = $this->server->dispatch( $request ); - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - - // Creating a section passing a parent_id which is not a course id produces a bad request. - $section_args = $this->sample_section_args; - - // This post doesn't exist. - $section_args['parent_id'] = 1234; - - $request->set_body_params( $section_args ); - $response = $this->server->dispatch( $request ); - - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - $this->assertResponseMessageEquals( 'Invalid parent_id param. It must be a valid Course ID.', $response ); - - // This post exists but is not a course. - $section_args['parent_id'] = $post; - - $request->set_body_params( $section_args ); - $response = $this->server->dispatch( $request ); - - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - $this->assertResponseMessageEquals( 'Invalid parent_id param. It must be a valid Course ID.', $response ); - - $this->sample_section_args['parent_id'] = $course; - - // Creating a section passing an order equal to 0 produces a bad request. - $section_args = $this->sample_section_args; - $section_args['order'] = 0; - $request->set_body_params( $section_args ); - $response = $this->server->dispatch( $request ); - - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - $this->assertResponseMessageEquals( 'Invalid order param. It must be greater than 0.', $response ); - - // create a section without title. - $section_args = $this->sample_section_args; - unset( $section_args['title'] ); - - $request->set_body_params( $section_args ); - $response = $this->server->dispatch( $request ); - // Bad request. - $this->assertEquals( 400, $response->get_status() ); - - } - - /** - * Test deleting a single section. - * - * @since 1.0.0-beta.1 - */ - public function test_delete_section() { - - wp_set_current_user( $this->user_allowed ); - - // create a section first. - $section = llms_get_post( $this->factory->post->create( array( 'post_type' => 'section' ) ) ); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $section->get( 'id' ) ); - - $response = $this->server->dispatch( $request ); - - // Success. - $this->assertEquals( 204, $response->get_status() ); - - // Cannot find just deleted post. - $this->assertFalse( get_post_status( $section->get( 'id' ) ) ); - - } - - /** - * Test trashing a single section. - * - * @since 1.0.0-beta.1 - */ - public function test_trash_section() { - - wp_set_current_user( $this->user_allowed ); - - // create a section first. - $section = llms_get_post( $this->factory->post->create( array( 'post_type' => 'section' ) ) ); - - $request = new WP_REST_Request( 'DELETE', $this->route . '/' . $section->get( 'id' ) ); - $request->set_param( 'force', false ); - $response = $this->server->dispatch( $request ); - - // We still expect a 204 section are always deleted and not trashed. - $this->assertEquals( 204, $response->get_status() ); - - // Cannot find just deleted post. - $this->assertFalse( get_post_status( $section->get( 'id' ) ) ); - - } - - /** - * Test list sections content. - * - * @since 1.0.0-beta.1 - * - * @todo test order and orderby - */ - public function test_get_sections_content() { - - wp_set_current_user( $this->user_allowed ); - - // create 1 course with 1 section but no lessons. - $course = $this->factory->course->create_and_get( - array( - 'sections' => 1, - 'lessons' => 0, - ) - ); - - $section_id = $course->get_sections( 'ids' )[0]; - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $section_id . '/content' ) ); - - // We have no lessons for this section so we expect a 404. - $this->assertEquals( 404, $response->get_status() ); - - // create 1 course with 5 sections and 3 lessons per section - $course = $this->factory->course->create_and_get( - array( - 'sections' => 5, - 'lessons' => 3, - ) - ); - - $section_ids = $course->get_sections( 'ids' ); - - foreach ( $section_ids as $section_id ) { - - $response = $this->server->dispatch( new WP_REST_Request( 'GET', $this->route . '/' . $section_id . '/content' ) ); - - // Success. - $this->assertEquals( 200, $response->get_status() ); - - $res_data = $response->get_data(); - $this->assertEquals( 3, count( $res_data ) ); - - for ( $i = 0; $i < 3; $i++ ) { - $this->assertEquals( $section_id, $res_data[ $i ]['parent_id'] ); - } - - } - - } - - /** - * Test sections content controller not initialized when not needed. - * - * @since 1.0.0-beta.1 - */ - public function test_sections_content_not_init() { - - $this->assertNotNull( $this->endpoint->get_content_controller() ); - - $new_sec_controller = new LLMS_REST_Sections_Controller( '' ); - $this->assertNull( $new_sec_controller->get_content_controller() ); - - } - - protected function filter_expected_fields( $expected, $llms_post ) { - - unset( $expected['content'] ); - $expected[ 'order' ] = $llms_post->get('order'); - $expected[ 'order' ] = $llms_post->get_parent_course(); - - return $expected; - - } - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-server-functions.php b/tests/unit-tests/server/class-llms-rest-test-server-functions.php deleted file mode 100644 index 4b5e9795..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-server-functions.php +++ /dev/null @@ -1,142 +0,0 @@ -assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 401 ), $err ); - $this->assertWPErrorMessageEquals( 'The API credentials were invalid.', $err ); - - // Custom message. - $err = llms_rest_authorization_required_error( 'My message.' ); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 401 ), $err ); - $this->assertWPErrorMessageEquals( 'My message.', $err ); - - } - - /** - * Test the llms_rest_authorization_required_error() function when logged in. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_llms_rest_authorization_required_error_logged_in() { - - wp_set_current_user( $this->factory->user->create() ); - - // Default. - $err = llms_rest_authorization_required_error(); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 403 ), $err ); - $this->assertWPErrorMessageEquals( 'You are not authorized to perform this request.', $err ); - - // Custom message. - $err = llms_rest_authorization_required_error( 'My message.' ); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 403 ), $err ); - $this->assertWPErrorMessageEquals( 'My message.', $err ); - - } - - /** - * Test the llms_rest_bad_request_error() function. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_llms_rest_bad_request_error() { - - // Default. - $err = llms_rest_bad_request_error(); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 400 ), $err ); - $this->assertWPErrorMessageEquals( 'Invalid or malformed request syntax.', $err ); - - // Custom message. - $err = llms_rest_bad_request_error( 'My message.' ); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 400 ), $err ); - $this->assertWPErrorMessageEquals( 'My message.', $err ); - - } - - /** - * Test the llms_rest_not_found_error() function. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_llms_rest_not_found_error() { - - // Default. - $err = llms_rest_not_found_error(); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_not_found', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 404 ), $err ); - $this->assertWPErrorMessageEquals( 'The requested resource could not be found.', $err ); - - // Custom message. - $err = llms_rest_not_found_error( 'My message.' ); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_not_found', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 404 ), $err ); - $this->assertWPErrorMessageEquals( 'My message.', $err ); - - } - - /** - * Test the llms_rest_server_error() function. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_llms_rest_server_error() { - - // Default. - $err = llms_rest_server_error(); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_server_error', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 500 ), $err ); - $this->assertWPErrorMessageEquals( 'Internal Server Error.', $err ); - - // Custom message. - $err = llms_rest_server_error( 'My message.' ); - $this->assertIsWPError( $err ); - $this->assertWPErrorCodeEquals( 'llms_rest_server_error', $err ); - $this->assertWPErrorDataEquals( array( 'status' => 500 ), $err ); - $this->assertWPErrorMessageEquals( 'My message.', $err ); - - } - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-students-controllers.php b/tests/unit-tests/server/class-llms-rest-test-students-controllers.php deleted file mode 100644 index 77d5ca06..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-students-controllers.php +++ /dev/null @@ -1,1011 +0,0 @@ - 'jamief_%d@mockstudent.tld', - 'first_name' => 'Jamie', - 'last_name' => 'Fitzgerald', - 'name' => 'Jamie Fitzgerald', - 'nickname' => 'JamieF1932', - 'username' => 'jamief_%d', - 'url' => 'http://jamief.geocities.com', - 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', - 'billing_address_1' => '123 Some Street', - 'billing_address_2' => 'Suite A', - 'billing_city' => 'Some City', - 'billing_state' => 'NH', - 'billing_postcode' => '32319', - 'billing_country' => 'USA', - ); - - private function get_mock_student_data( $i ) { - - $data = $this->mock_student_data; - - $data['email'] = sprintf( $data['email'], $i ); - $data['username'] = sprintf( $data['username'], $i ); - - return $data; - - } - - /** - * Retrieve an LLMS_Student with data. - * - * @since 1.0.0-beta.1 - * - * @param array $data Array of user information. - * @return LLMS_Student - */ - private function get_student_with_data( $data = array() ) { - - $student = $this->factory->student->create_and_get( array( - 'user_email' => $data['email'], - 'user_login' => $data['username'], - 'user_url' => $data['url'], - 'display_name' => $data['name'] - ) ); - - unset( $data['email'], $data['username'], $data['url'], $data['name'] ); - - foreach ( $data as $key => $val ) { - $student->set( $key, $val, 0 === strpos( $key, 'billing_' ) ? true : false ); - } - - return $student; - - } - - /** - * Setup the test case. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function setUp() { - - parent::setUp(); - $this->user_admin = $this->factory->user->create( array( 'role' => 'administrator', ) ); - $this->user_instructor = $this->factory->user->create( array( 'role' => 'instructor', ) ); - $this->user_subscriber = $this->factory->user->create( array( 'role' => 'subscriber', ) ); - $this->endpoint = new LLMS_REST_Students_Controller(); - - } - - /** - * Teardown test - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function tearDown() { - - parent::tearDown(); - - global $wpdb; - $wpdb->query( "TRUNCATE TABLE {$wpdb->users}" ); - - } - - /** - * Test the create_item method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_item() { - - // Unauthorized user. - wp_set_current_user( null ); - $data = $this->get_mock_student_data( 3 ); - $res = $this->perform_mock_request( 'POST', $this->route, $data ); - $this->assertResponseStatusEquals( 401, $res ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $res ); - - // Forbidden user. - wp_set_current_user( $this->user_subscriber ); - $res = $this->perform_mock_request( 'POST', $this->route, $data ); - $this->assertResponseStatusEquals( 403, $res ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - - // Instructor's can't create. - wp_set_current_user( $this->user_instructor ); - $res = $this->perform_mock_request( 'POST', $this->route, $data ); - $this->assertResponseStatusEquals( 403, $res ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - - // Okay. - wp_set_current_user( $this->user_admin ); - $data = $this->get_mock_student_data( 4 ); - $password = wp_generate_password(); - $res = $this->perform_mock_request( 'POST', $this->route, array_merge( compact( 'password' ), $data ) ); - $this->assertResponseStatusEquals( 201, $res ); - - $res_data = $res->get_data(); - foreach ( $data as $key => $expected ) { - $this->assertEquals( $expected, $res_data[ $key ], $key ); - } - - $this->assertEquals( array( 'student' ), $res_data['roles'] ); - - $this->assertArrayHasKey( 'id', $res_data ); - $this->assertArrayHasKey( 'registered_date', $res_data ); - $this->assertArrayHasKey( 'avatar_urls', $res_data ); - - // Check password. - $user = get_user_by( 'id', $res_data['id'] ); - $this->assertTrue( wp_check_password( $password, $user->user_pass ) ); - - // Location header. - $headers = $res->get_headers(); - $this->assertEquals( rest_url( sprintf( '%1$s/%2$d', $this->route, $res_data['id'] ) ), $headers['Location'] ); - - // Links. - $this->assertEquals( $this->expected_link_rels, array_keys( $res->get_links() ) ); - - } - - /** - * Test create user permission check - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_create_item_permissions_check() { - - $request = new WP_REST_Request( 'POST', $this->route ); - - // Unauthorized user. - wp_set_current_user( null ); - $ret = $this->endpoint->create_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $ret ); - - // Cannot create students. - $nay = array( 'subscriber', 'instructor', 'instructors_assistant' ); - foreach ( $nay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $ret = $this->endpoint->create_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $ret ); - } - - // Can create. - $yay = array( 'administrator', 'lms_manager' ); - foreach ( $yay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $this->assertTrue( $this->endpoint->create_item_permissions_check( $request ) ); - } - - } - - public function test_delete_item() { - - $id = $this->factory->student->create(); - - // no user. - $res = $this->perform_mock_request( 'DELETE', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertResponseStatusEquals( 401, $res ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $res ); - - // Forbidden user. - wp_set_current_user( $this->user_subscriber ); - $res = $this->perform_mock_request( 'DELETE', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertResponseStatusEquals( 403, $res ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - - // Good. - wp_set_current_user( $this->user_admin ); - $res = $this->perform_mock_request( 'DELETE', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertTrue( is_null( $res->get_data() ) ); - $this->assertResponseStatusEquals( 204, $res ); - - // deleting the same user again has the same result. - $res = $this->perform_mock_request( 'DELETE', sprintf( '%1$s/%2$d', $this->route, $id ) ); - $this->assertTrue( is_null( $res->get_data() ) ); - $this->assertResponseStatusEquals( 204, $res ); - - } - - /** - * Test delete item permission check - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_delete_item_permissions_check() { - - $user_id = $this->factory->student->create(); - - $request = new WP_REST_Request( 'DELETE', sprintf( '%1$s/%2$d', $this->route, $user_id ) ); - $request->set_url_params( array( 'id' => $user_id ) ); - - // Unauthorized user. - wp_set_current_user( null ); - $ret = $this->endpoint->delete_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $ret ); - - // Cannot delete students. - $nay = array( 'subscriber', 'instructor', 'instructors_assistant' ); - foreach ( $nay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $ret = $this->endpoint->delete_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $ret ); - } - - // Can delete student. - $yay = array( 'administrator', 'lms_manager' ); - foreach ( $yay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $this->assertTrue( $this->endpoint->delete_item_permissions_check( $request ) ); - } - - } - - /** - * Test get item permission check - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_item_permissions_check() { - - $user_id = $this->factory->student->create(); - - $request = new WP_REST_Request( 'GET', sprintf( '%1$s/%2$d', $this->route, $user_id ) ); - $request->set_url_params( array( 'id' => $user_id ) ); - - // Unauthorized user. - wp_set_current_user( null ); - $ret = $this->endpoint->get_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $ret ); - - // can get self. - wp_set_current_user( $user_id ); - $this->assertTrue( $this->endpoint->get_item_permissions_check( $request ) ); - - // Cannot get students. - $nay = array( 'subscriber', 'instructor', 'instructors_assistant' ); - foreach ( $nay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $ret = $this->endpoint->get_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $ret ); - } - - // Can get student. - $yay = array( 'administrator', 'lms_manager' ); - foreach ( $yay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $this->assertTrue( $this->endpoint->get_item_permissions_check( $request ) ); - } - - // Can get their own students. - $own = array( 'instructor', 'instructors_assistant' ); - foreach( $own as $role ) { - - $user = $this->factory->user->create( array( 'role' => $role ) ); - $course = $this->factory->course->create_and_get( array( 'sections' => 0 ) ); - $course->instructors()->set_instructors( array( array( 'id' => $user ) ) ); - llms_enroll_student( $user_id, $course->get( 'id' ) ); - - wp_set_current_user( $user ); - - $this->assertTrue( $this->endpoint->get_item_permissions_check( $request ) ); - - } - - } - - /** - * Test get item permission check - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_items_permissions_check() { - - $user_id = $this->factory->student->create(); - - $request = new WP_REST_Request( 'GET', $this->route ); - - // Unauthorized user. - wp_set_current_user( null ); - $ret = $this->endpoint->get_items_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $ret ); - - // Cannot get students. - $nay = array( 'subscriber' ); - foreach ( $nay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $ret = $this->endpoint->get_items_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $ret ); - } - - // Can get students. - $yay = array( 'administrator', 'lms_manager', 'instructor', 'instructors_assistant' ); - foreach ( $yay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $this->assertTrue( $this->endpoint->get_items_permissions_check( $request ) ); - } - - // Add roles to the request. - $request->set_query_params( array( 'roles' => 'student' ) ); - - // Cannot get students by role. - $nay = array( 'instructor', 'instructors_assistant' ); - foreach ( $nay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $ret = $this->endpoint->get_items_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $ret ); - } - - // Can filter students by role. - $yay = array( 'administrator', 'lms_manager' ); - foreach ( $yay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $this->assertTrue( $this->endpoint->get_items_permissions_check( $request ) ); - } - - } - - /** - * Ensure all collection parameters have been registered. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_collection_params() { - - $params = $this->endpoint->get_collection_params(); - $this->assertArrayHasKey( 'context', $params ); - $this->assertArrayHasKey( 'page', $params ); - $this->assertArrayHasKey( 'per_page', $params ); - $this->assertArrayHasKey( 'order', $params ); - $this->assertArrayHasKey( 'orderby', $params ); - $this->assertArrayHasKey( 'include', $params ); - $this->assertArrayHasKey( 'roles', $params ); - $this->assertArrayHasKey( 'enrolled_in', $params ); - $this->assertArrayHasKey( 'enrolled_not_in', $params ); - - } - - /** - * Test the get_item() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_item() { - - $data = $this->get_mock_student_data( 2 ); - $student = $this->get_student_with_data( $data ); - - $route = sprintf( '%1$s/%2$d', $this->route, $student->get( 'id' ) ); - - // No user. - $res = $this->perform_mock_request( 'GET', $route ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $res ); - $this->assertResponseStatusEquals( 401, $res ); - - // Forbidden user. - wp_set_current_user( $this->user_subscriber ); - $res = $this->perform_mock_request( 'GET', $route ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - $this->assertResponseStatusEquals( 403, $res ); - - // Admin okay. - wp_set_current_user( $this->user_admin ); - - // Test default (view), view (explicit), and edit contexts. - foreach ( array( null, 'view', 'edit' ) as $context ) { - - if ( $context ) { - $res = $this->perform_mock_request( 'GET', $route, array(), array( 'context' => $context ) ); - } else { - $res = $this->perform_mock_request( 'GET', $route ); - } - - $this->assertResponseStatusEquals( 200, $res ); - - $data = $res->get_data(); - $this->assertEquals( $student->get( 'id' ), $data['id'] ); - $this->assertEquals( $data['name'], $data['name'] ); - $this->assertEquals( $data['url'], $data['url'] ); - $this->assertEquals( $data['description'], $data['description'] ); - $this->assertArrayHasKey( 'avatar_urls', $data ); - - $this->assertEquals( $this->expected_link_rels, array_keys( $res->get_links() ) ); - - if ( 'edit' === $context ) { - - $this->assertEquals( $data['first_name'], $data['first_name'] ); - $this->assertEquals( $data['last_name'], $data['last_name'] ); - $this->assertEquals( $data['username'], $data['username'] ); - $this->assertEquals( $data['email'], $data['email'] ); - $this->assertEquals( $data['nickname'], $data['nickname'] ); - - $this->assertEquals( $data['billing_address_1'], $data['billing_address_1'] ); - $this->assertEquals( $data['billing_address_2'], $data['billing_address_2'] ); - $this->assertEquals( $data['billing_city'], $data['billing_city'] ); - $this->assertEquals( $data['billing_state'], $data['billing_state'] ); - $this->assertEquals( $data['billing_postcode'], $data['billing_postcode'] ); - $this->assertEquals( $data['billing_country'], $data['billing_country'] ); - - $this->assertEquals( array( 'student' ), $data['roles'] ); - $this->assertArrayHasKey( 'registered_date', $data ); - - } - - } - - // Instructor is forbidden. - wp_set_current_user( $this->user_instructor ); - $res = $this->perform_mock_request( 'GET', $route ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - $this->assertResponseStatusEquals( 403, $res ); - - // Instructor can retrieve because student's in their course. - $course = $this->factory->course->create_and_get( array( 'sections' => 0 ) ); - $course->set_instructors( array( array( 'id' => $this->user_instructor ) ) ); - $student->enroll( $course->get( 'id' ) ); - - $res = $this->perform_mock_request( 'GET', $route ); - $this->assertResponseStatusEquals( 200, $res ); - - } - - public function test_get_items_errors() { - - - // No user. - $res = $this->perform_mock_request( 'GET', $this->route ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $res ); - $this->assertResponseStatusEquals( 401, $res ); - - // Forbidden user. - wp_set_current_user( $this->user_subscriber ); - $res = $this->perform_mock_request( 'GET', $this->route ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - $this->assertResponseStatusEquals( 403, $res ); - - - } - - public function test_get_items_pagination() { - - global $wpdb; - - $this->factory->user->create_many( 5 ); - $this->factory->student->create_many( 25 ); - $db_total = absint( $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->users}" ) ); - - - $db_pages = ceil( $db_total / 10 ); - - wp_set_current_user( $this->user_admin ); - $res = $this->perform_mock_request( 'GET', $this->route ); - - // Correct # of results to default 10 / page - $this->assertEquals( 10, count( $res->get_data() ) ); - - // Check Pagination headers. - $headers = $res->get_headers(); - $this->assertEquals( $db_total, $headers['X-WP-Total'] ); - $this->assertEquals( $db_pages, $headers['X-WP-TotalPages'] ); - - // Link headers. - $links = $this->parse_link_headers( $res ); - $this->assertEquals( array( 'next', 'last' ), array_keys( $links ) ); - - - // Page 2. - $res = $this->perform_mock_request( 'GET', $this->route, array(), array( 'page' => 2 ) ); - - // Link headers. - $links = $this->parse_link_headers( $res ); - $this->assertEquals( array( 'first', 'prev', 'next', 'last' ), array_keys( $links ) ); - - - // Last page. - $res = $this->perform_mock_request( 'GET', $this->route, array(), array( 'page' => $db_pages ) ); - - // Link headers. - $links = $this->parse_link_headers( $res ); - $this->assertEquals( array( 'first', 'prev' ), array_keys( $links ) ); - - - // Big per page. - $res = $this->perform_mock_request( 'GET', $this->route, array(), array( 'per_page' => 100 ) ); - - // Check Pagination headers. - $headers = $res->get_headers(); - $this->assertEquals( $db_total, $headers['X-WP-Total'] ); - $this->assertEquals( 1, $headers['X-WP-TotalPages'] ); - - // No links because this is the only page. - $links = $this->parse_link_headers( $res ); - $this->assertEquals( array(), array_keys( $links ) ); - - // Out of bounds. - $res = $this->perform_mock_request( 'GET', $this->route, array(), array( 'page' => 25, 'per_page' => 100 ) ); - $this->assertEquals( array(), $res->get_data() ); - - } - - public function test_get_items_orderby_id() { - - wp_set_current_user( $this->user_admin ); - $low = $this->factory->user->create( array() ); - $high = $this->factory->user->create( array() ); - $args = array( 'include' => array( $low, $high ), 'orderby' => 'id' ); - - // Default / asc. - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $low, $res->get_data()[0]['id'] ); - - // Desc. - $args['order'] = 'desc'; - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $high, $res->get_data()[0]['id'] ); - - } - - public function test_get_items_orderby_email() { - - wp_set_current_user( $this->user_admin ); - $low = $this->factory->user->create( array( array( 'user_email' => 'aemail@mock.tld' ) ) ); - $high = $this->factory->user->create( array( array( 'user_email' => 'bemail@mock.tld' ) ) ); - $args = array( 'include' => array( $low, $high ), 'orderby' => 'email' ); - - // Default / asc. - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $low, $res->get_data()[0]['id'] ); - - // Desc. - $args['order'] = 'desc'; - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $high, $res->get_data()[0]['id'] ); - - } - - public function test_get_items_orderby_name() { - - wp_set_current_user( $this->user_admin ); - $low = $this->factory->user->create( array( 'display_name' => 'A Name' ) ); - $high = $this->factory->user->create( array( 'display_name' => 'B Name' ) ); - $args = array( 'include' => array( $low, $high ), 'orderby' => 'name' ); - - // Default / asc. - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $low, $res->get_data()[0]['id'] ); - - // Desc. - $args['order'] = 'desc'; - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $high, $res->get_data()[0]['id'] ); - - } - - public function test_get_items_orderby_registered_date() { - - wp_set_current_user( $this->user_admin ); - $low = $this->factory->user->create( array( 'user_registered' => date( 'Y-m-d h:i:s', strtotime( '-5 days', time() ) ) ) ); - $high = $this->factory->user->create(); - $args = array( 'include' => array( $low, $high ), 'orderby' => 'registered_date' ); - - // Default / asc. - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $low, $res->get_data()[0]['id'] ); - - // Desc. - $args['order'] = 'desc'; - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $high, $res->get_data()[0]['id'] ); - - } - - public function test_get_items_enrollement_filters() { - - wp_set_current_user( $this->user_admin ); - - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - - $args = array( - 'include' => array(), - 'enrolled_in' => $course, - ); - for ( $i = 1; $i <= 3; $i++ ) { - $args['include'][] = $this->factory->student->create(); - } - - // None are enrolled. - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( array(), $res->get_data() ); - - unset( $args['enrolled_in'] ); - $args['enrolled_not_in'] = $course; - - // All are not enrolled. - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( $args['include'], wp_list_pluck( $res->get_data(), 'id' ) ); - - // Enroll a student. - llms_enroll_student( $args['include'][0], $course ); - - // Return only the non-enrolled students. - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( array( $args['include'][1], $args['include'][2] ), wp_list_pluck( $res->get_data(), 'id' ) ); - - // Only return the enrolled student. - unset( $args['enrolled_not_in'] ); - $args['enrolled_in'] = $course; - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( array( $args['include'][0] ), wp_list_pluck( $res->get_data(), 'id' ) ); - - // No one's enrolled in both. - $course_2 = $this->factory->course->create( array( 'sections' => 0 ) ); - $args['enrolled_in'] .= ',' . $course_2; - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( array(), wp_list_pluck( $res->get_data(), 'id' ) ); - - // One enrolled in both. - llms_enroll_student( $args['include'][0], $course_2 ); - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( array( $args['include'][0] ), wp_list_pluck( $res->get_data(), 'id' ) ); - - unset( $args['enrolled_in'] ); - $args['enrolled_not_in'] = array( $course, $course_2 ); - $res = $this->perform_mock_request( 'GET', $this->route, array(), $args ); - $this->assertEquals( array( $args['include'][1], $args['include'][2] ), wp_list_pluck( $res->get_data(), 'id' ) ); - - } - - /** - * Test the item schema. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_item_schema() { - - $schema = $this->endpoint->get_item_schema(); - - $this->assertEquals( 'student', $schema['title'] ); - - $props = array( - 'id', - 'username', - 'name', - 'first_name', - 'last_name', - 'email', - 'url', - 'description', - 'nickname', - 'registered_date', - 'roles', - 'password', - 'billing_address_1', - 'billing_address_2', - 'billing_city', - 'billing_state', - 'billing_postcode', - 'billing_country', - 'avatar_urls', - ); - - $this->assertEquals( $props, array_keys( $schema['properties'] ) ); - - $this->assertEquals( array( 'student' ), $schema['properties']['roles']['default'] ); - - $schema = $this->endpoint->get_item_schema(); - update_option( 'show_avatars', '' ); - $this->assertFalse( array_key_exists( 'avatar_urls', array_keys( $schema['properties'] ) ) ); - - update_option( 'show_avatars', 1 ); - - } - - /** - * Test the get_object method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_get_object() { - - $id = $this->factory->student->create(); - - // Good. - $student = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'get_object', array( $id ) ); - $this->assertTrue( is_a( $student, 'LLMS_Student' ) ); - - // 404. - $error_404 = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'get_object', array( $id + 1 ) ); - $this->assertIsWPError( $error_404 ); - $this->assertWPErrorCodeEquals( 'llms_rest_not_found', $error_404 ); - - } - - /** - * Test the prepare_object_for_response() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_prepare_object_for_response() { - - $data = $this->get_mock_student_data( 1 ); - $student = $this->get_student_with_data( $data ); - $prepared = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_object_for_response', array( $student, new WP_REST_Request( 'GET', $this->route ) ) ); - - foreach ( $data as $key => $val ) { - $this->assertEquals( $val, $prepared[ $key ], $key ); - } - - $this->assertEquals( array( 'student' ), $prepared['roles'] ); - $this->assertArrayHasKey( 'avatar_urls', $prepared ); - - } - - /** - * Test the prepare_item_for_database() method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_prepare_item_for_database() { - - $request = new WP_REST_Request( 'POST', $this->route ); - $args = array( - 'email' => 'mock@mock.tld', - 'registered_date' => current_time( 'mysql' ), - 'first_name' => 'Sarah', - 'username' => 'mockername', - 'password' => wp_generate_password(), - ); - $request->set_body_params( $args ); - $prepared = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_item_for_database', array( $request ) ); - - $this->assertEquals( $args['email'], $prepared['user_email'] ); - $this->assertEquals( $args['registered_date'], $prepared['user_registered'] ); - $this->assertEquals( $args['first_name'], $prepared['first_name'] ); - $this->assertEquals( $args['username'], $prepared['user_login'] ); - $this->assertEquals( $args['password'], $prepared['user_pass'] ); - - // Test setting of "required" optional args during a creation. - $request = new WP_REST_Request( 'POST', $this->route ); - $args = array( - 'email' => 'mock@mock.tld', - ); - $request->set_body_params( $args ); - $prepared = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_item_for_database', array( $request ) ); - - $this->assertEquals( $args['email'], $prepared['user_email'] ); - $this->assertArrayHasKey( 'user_login', $prepared ); - $this->assertArrayHasKey( 'user_pass', $prepared ); - - // Optional args won't be passed in during an UPDATE (only during creation) - $request = new WP_REST_Request( 'POST', $this->route . '/123' ); - $args = array( - 'email' => 'mock@mock.tld', - 'password' => 'MyNewPasswordStinks', - ); - $request->set_body_params( $args ); - $request->set_url_params( array( 'id' => 123 ) ); - $prepared = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_item_for_database', array( $request ) ); - - $this->assertEquals( $args['email'], $prepared['user_email'] ); - $this->assertEquals( $args['password'], $prepared['user_pass'] ); - $this->assertTrue( ! array_key_exists( 'user_login', $prepared ) ); - - } - - /** - * Test the prepare_links method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_prepare_links() { - - $student = $this->factory->student->create_and_get(); - $links = LLMS_Unit_Test_Util::call_method( $this->endpoint, 'prepare_links', array( $student ) ); - foreach ( array( 'self', 'collection', 'enrollments', 'progress' ) as $rel ) { - $this->assertArrayHasKey( $rel, $links ); - } - - } - - /** - * Test route registration - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_register_routes() { - - $routes = $this->server->get_routes(); - $this->assertArrayHasKey( $this->route, $routes ); - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)', $routes ); - - } - - /** - * Test the create_item method. - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_item() { - - $updating = $this->factory->student->create(); - - $route = sprintf( '%1$s/%2$d', $this->route, $updating ); - - // Unauthorized user. - wp_set_current_user( null ); - $data = $this->get_mock_student_data( 10 ); - $res = $this->perform_mock_request( 'POST', $route, $data ); - $this->assertResponseStatusEquals( 401, $res ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $res ); - - // Forbidden user. - wp_set_current_user( $this->user_subscriber ); - $res = $this->perform_mock_request( 'POST', $route, $data ); - $this->assertResponseStatusEquals( 403, $res ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - - // Instructor's can't create. - wp_set_current_user( $this->user_instructor ); - $res = $this->perform_mock_request( 'POST', $route, $data ); - $this->assertResponseStatusEquals( 403, $res ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $res ); - - - // Can't edit username. - wp_set_current_user( $this->user_admin ); - $data = $this->get_mock_student_data( 11 ); - $password = wp_generate_password(); - $res = $this->perform_mock_request( 'POST', $route, array_merge( compact( 'password' ), $data ) ); - $this->assertResponseStatusEquals( 400, $res ); - $this->assertResponseMessageEquals( 'Username is not editable.', $res ); - $this->assertResponseCodeEquals( 'llms_rest_bad_request', $res ); - - unset( $data['username'] ); - - // Okay. - $res = $this->perform_mock_request( 'POST', $route, array_merge( compact( 'password' ), $data ) ); - $this->assertResponseStatusEquals( 200, $res ); - - $res_data = $res->get_data(); - foreach ( $data as $key => $expected ) { - $this->assertEquals( $expected, $res_data[ $key ], $key ); - } - - $this->assertEquals( array( 'student' ), $res_data['roles'] ); - - $this->assertArrayHasKey( 'id', $res_data ); - $this->assertArrayHasKey( 'registered_date', $res_data ); - $this->assertArrayHasKey( 'avatar_urls', $res_data ); - - // Check password. - $user = get_user_by( 'id', $res_data['id'] ); - $this->assertTrue( wp_check_password( $password, $user->user_pass ) ); - - // Links. - $this->assertEquals( $this->expected_link_rels, array_keys( $res->get_links() ) ); - - // user can update self. - wp_set_current_user( $updating ); - $res = $this->perform_mock_request( 'POST', $route, array( - 'first_name' => 'Myself', - ) ); - $this->assertResponseStatusEquals( 200, $res ); - $this->assertEquals( 'Myself', $res->get_data()['first_name'] ); - - // Cannot update email to an email that already exists. - $this->factory->student->create( array( 'user_email' => 'thisemailalreadyexists@test.tld' ) ); - $res = $this->perform_mock_request( 'POST', $route, array( - 'email' => 'thisemailalreadyexists@test.tld', - ) ); - $this->assertResponseStatusEquals( 400, $res ); - $this->assertResponseMessageEquals( 'Invalid email address.', $res ); - $this->assertResponseCodeEquals( 'llms_rest_bad_request', $res ); - - } - - - /** - * Test update item permission check - * - * @since 1.0.0-beta.1 - * - * @return void - */ - public function test_update_item_permissions_check() { - - $user_id = $this->factory->student->create(); - - $request = new WP_REST_Request( 'GET', sprintf( '%1$s/%2$d', $this->route, $user_id ) ); - $request->set_url_params( array( 'id' => $user_id ) ); - - // Unauthorized user. - wp_set_current_user( null ); - $ret = $this->endpoint->update_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_unauthorized_request', $ret ); - - // can update self. - wp_set_current_user( $user_id ); - $this->assertTrue( $this->endpoint->update_item_permissions_check( $request ) ); - - // Cannot update students. - $nay = array( 'subscriber', 'instructor', 'instructors_assistant' ); - foreach ( $nay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $ret = $this->endpoint->update_item_permissions_check( $request ); - $this->assertIsWPError( $ret ); - $this->assertWPErrorCodeEquals( 'llms_rest_forbidden_request', $ret ); - } - - // Can update student. - $yay = array( 'administrator', 'lms_manager' ); - foreach ( $yay as $role ) { - wp_set_current_user( $this->factory->user->create( array( 'role' => $role ) ) ); - $this->assertTrue( $this->endpoint->update_item_permissions_check( $request ) ); - } - - } - - -} diff --git a/tests/unit-tests/server/class-llms-rest-test-students-progress-controller.php b/tests/unit-tests/server/class-llms-rest-test-students-progress-controller.php deleted file mode 100644 index 7937f07b..00000000 --- a/tests/unit-tests/server/class-llms-rest-test-students-progress-controller.php +++ /dev/null @@ -1,321 +0,0 @@ -[\d]+)/progress'; - - /** - * Setup our test server, endpoints, and user info. - */ - public function setUp() { - - parent::setUp(); - - global $wpdb; - $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}lifterlms_user_postmeta" ); - - $this->endpoint = new LLMS_REST_Students_Progress_Controller(); - - $this->user_allowed = $this->factory->user->create( array( 'role' => 'administrator' ) ); - $this->user_forbidden = $this->factory->user->create( array( 'role' => 'subscriber' ) ); - $this->user_student = $this->factory->student->create(); - - } - - private function get_route( $student_id, $post_id = null ) { - $route = str_replace( '(?P[\d]+)', $student_id, $this->route ); - if ( $post_id ) { - $route .= '/' . $post_id; - } - return $route; - } - - /** - * Test route registration. - * - * @since 1.0.0-beta.1 - */ - public function test_register_routes() { - - $routes = $this->server->get_routes(); - $this->assertArrayHasKey( $this->route . '/(?P[\d]+)', $routes ); - - } - - public function test_delete_item() { - - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - $route = $this->get_route( $this->user_student, $course ); - llms_enroll_student( $this->user_student, $course ); - $student = llms_get_student( $this->user_student ); - - wp_set_current_user( $this->user_allowed ); - $response = $this->perform_mock_request( 'DELETE', $route ); - $this->assertResponseStatusEquals( 204, $response ); - - // Mark the course complete. - $response = $this->perform_mock_request( 'POST', $route, array( - 'status' => 'complete' - ) ); - - $response = $this->perform_mock_request( 'DELETE', $route ); - $this->assertResponseStatusEquals( 204, $response ); - - $this->assertEquals( 0, $student->get_progress( $course, 'course' ) ); - - } - - public function test_get_item_errors() { - - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - $route = $this->get_route( $this->user_student, $course ); - llms_enroll_student( $this->user_student, $course ); - - // Unauthorized. - $response = $this->perform_mock_request( 'GET', $route ); - $this->assertResponseStatusEquals( 401, $response ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $response ); - - // Forbidden. - wp_set_current_user( $this->user_forbidden ); - $response = $this->perform_mock_request( 'GET', $route ); - $this->assertResponseStatusEquals( 403, $response ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $response ); - - } - - public function test_get_item_course() { - - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - $route = $this->get_route( $this->user_student, $course ); - llms_enroll_student( $this->user_student, $course ); - - wp_set_current_user( $this->user_allowed ); - $response = $this->perform_mock_request( 'GET', $route ); - $this->assertResponseStatusEquals( 200, $response ); - $data = $response->get_data(); - - $this->assertEquals( (float) 0, $data['progress'] ); - $this->assertEquals( 'incomplete', $data['status'] ); - $this->assertEquals( $course, $data['post_id'] ); - $this->assertEquals( $this->user_student, $data['student_id'] ); - $this->assertNull( $data['date_created'] ); - $this->assertNull( $data['date_updated'] ); - - } - - public function test_update_item_errors() { - - $course = $this->factory->course->create( array( 'sections' => 0 ) ); - $route = $this->get_route( $this->user_student, $course ); - llms_enroll_student( $this->user_student, $course ); - - // Missing required params. - $response = $this->perform_mock_request( 'POST', $route ); - $this->assertResponseStatusEquals( 400, $response ); - $this->assertResponseCodeEquals( 'rest_missing_callback_param', $response ); - - $args = array( - 'status' => 'fake', - ); - - // Invalid status. - $response = $this->perform_mock_request( 'POST', $route, $args ); - $this->assertResponseStatusEquals( 400, $response ); - $this->assertResponseCodeEquals( 'rest_invalid_param', $response ); - - $args['status'] = 'complete'; - - // Unauthorized. - $response = $this->perform_mock_request( 'POST', $route, $args ); - $this->assertResponseStatusEquals( 401, $response ); - $this->assertResponseCodeEquals( 'llms_rest_unauthorized_request', $response ); - - // Forbidden. - wp_set_current_user( $this->user_forbidden ); - $response = $this->perform_mock_request( 'POST', $route, $args ); - $this->assertResponseStatusEquals( 403, $response ); - $this->assertResponseCodeEquals( 'llms_rest_forbidden_request', $response ); - - } - - public function test_update_item_course() { - - $student = llms_get_student( $this->user_student ); - $course = $this->factory->course->create( array( 'sections' => 1 ) ); - $route = $this->get_route( $this->user_student, $course ); - llms_enroll_student( $this->user_student, $course ); - - // Mark course complete. - wp_set_current_user( $this->user_allowed ); - $response = $this->perform_mock_request( 'POST', $route, array( - 'status' => 'complete' - ) ); - $this->assertResponseStatusEquals( 200, $response ); - $data = $response->get_data(); - - $this->assertEquals( (float) 100, $data['progress'] ); - $this->assertEquals( 'complete', $data['status'] ); - $this->assertEquals( $course, $data['post_id'] ); - $this->assertEquals( $this->user_student, $data['student_id'] ); - $this->assertTrue( ! empty( $data['date_created'] ) ); - $this->assertTrue( ! empty( $data['date_updated'] ) ); - - $this->assertEquals( array( 'self', 'post', 'student' ), array_keys( $response->get_links() ) ); - - $this->assertEquals( (float) 100, $student->get_progress( $course, 'course' ) ); - - // Mark Incomplete. - $response = $this->perform_mock_request( 'POST', $route, array( - 'status' => 'incomplete' - ) ); - $this->assertResponseStatusEquals( 200, $response ); - $data = $response->get_data(); - $this->assertEquals( (float) 0, $data['progress'] ); - $this->assertEquals( 'incomplete', $data['status'] ); - - $this->assertEquals( (float) 0, $student->get_progress( $course, 'course' ) ); - - } - - public function test_update_item_section() { - - $student = llms_get_student( $this->user_student ); - $course = llms_get_post( $this->factory->course->create( array( 'sections' => 1, 'lessons' => 3 ) ) ); - $section = $course->get_sections( 'ids' )[0]; - $route = $this->get_route( $this->user_student, $section ); - llms_enroll_student( $this->user_student, $course->get( 'id' ) ); - - // Mark course complete. - wp_set_current_user( $this->user_allowed ); - $response = $this->perform_mock_request( 'POST', $route, array( - 'status' => 'complete' - ) ); - $this->assertResponseStatusEquals( 200, $response ); - $data = $response->get_data(); - - $this->assertEquals( (float) 100, $data['progress'] ); - $this->assertEquals( 'complete', $data['status'] ); - $this->assertEquals( $section, $data['post_id'] ); - $this->assertEquals( $this->user_student, $data['student_id'] ); - $this->assertTrue( ! empty( $data['date_created'] ) ); - $this->assertTrue( ! empty( $data['date_updated'] ) ); - - $this->assertEquals( array( 'self', 'post', 'student' ), array_keys( $response->get_links() ) ); - - $this->assertEquals( (float) 100, $student->get_progress( $section, 'section' ) ); - - // Mark Incomplete. - $response = $this->perform_mock_request( 'POST', $route, array( - 'status' => 'incomplete' - ) ); - $this->assertResponseStatusEquals( 200, $response ); - $data = $response->get_data(); - $this->assertEquals( (float) 0, $data['progress'] ); - $this->assertEquals( 'incomplete', $data['status'] ); - - $this->assertEquals( (float) 0, $student->get_progress( $section, 'section' ) ); - - } - - public function test_update_item_lesson() { - - $student = llms_get_student( $this->user_student ); - $course = llms_get_post( $this->factory->course->create( array( 'sections' => 1, 'lessons' => 3 ) ) ); - $lesson = $course->get_lessons( 'ids' )[0]; - $route = $this->get_route( $this->user_student, $lesson ); - llms_enroll_student( $this->user_student, $course->get( 'id' ) ); - - // Mark course complete. - wp_set_current_user( $this->user_allowed ); - $response = $this->perform_mock_request( 'POST', $route, array( - 'status' => 'complete' - ) ); - $this->assertResponseStatusEquals( 200, $response ); - $data = $response->get_data(); - - $this->assertEquals( (float) 100, $data['progress'] ); - $this->assertEquals( 'complete', $data['status'] ); - $this->assertEquals( $lesson, $data['post_id'] ); - $this->assertEquals( $this->user_student, $data['student_id'] ); - $this->assertTrue( ! empty( $data['date_created'] ) ); - $this->assertTrue( ! empty( $data['date_updated'] ) ); - - $this->assertEquals( array( 'self', 'post', 'student' ), array_keys( $response->get_links() ) ); - - $this->assertTrue( llms_is_complete( $this->user_student, $lesson, 'lesson' ) ); - - // Mark Incomplete. - $response = $this->perform_mock_request( 'POST', $route, array( - 'status' => 'incomplete' - ) ); - $this->assertResponseStatusEquals( 200, $response ); - $data = $response->get_data(); - $this->assertEquals( (float) 0, $data['progress'] ); - $this->assertEquals( 'incomplete', $data['status'] ); - - $this->assertFalse( llms_is_complete( $this->user_student, $lesson, 'lesson' ) ); - - } - - public function test_validate_date_created() { - - $course = $this->factory->course->create_and_get( array( 'sections' => 1, 'lessons' => 1 ) ); - $course_id = $course->get( 'id' ); - $request = new WP_REST_Request( 'POST', $this->get_route( $this->user_student, $course_id ) ); - - $res = $this->endpoint->validate_date_created( date( DATE_RFC3339, strtotime( '+1 day' ) ), $request, 'date_created' ); - $this->assertIsWPError( $res ); - $this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $res ); - $this->assertWPErrorMessageEquals( 'Created date cannot be in the future.', $res ); - - $this->assertTrue( $this->endpoint->validate_date_created( date( DATE_RFC3339, strtotime( '-1 day' ) ), $request, 'date_created' ) ); - - } - - public function test_validate_post_id() { - - $post = $this->factory->post->create(); - $course = $this->factory->course->create_and_get( array( 'sections' => 1, 'lessons' => 1 ) ); - $course_id = $course->get( 'id' ); - $request = new WP_REST_Request( 'POST', $this->get_route( $this->user_student, $course_id ) ); - $request->set_url_params( array( 'id' => $this->user_student ) ); - - // Post doesn't exist. - $this->assertFalse( $this->endpoint->validate_post_id( $post + 1, $request, 'post_id' ) ); - - // Post type isn't supported. - $this->assertFalse( $this->endpoint->validate_post_id( $post, $request, 'post_id' ) ); - - // User isn't enrolled. - $this->assertFalse( $this->endpoint->validate_post_id( $course_id, $request, 'post_id' ) ); - - llms_enroll_student( $this->user_student, $course_id ); - - // Valid course. - $this->assertTrue( $this->endpoint->validate_post_id( $course_id, $request, 'post_id' ) ); - - // Valid section. - $this->assertTrue( $this->endpoint->validate_post_id( $course->get_sections( 'ids' )[0], $request, 'post_id' ) ); - - // Valid lesson. - $this->assertTrue( $this->endpoint->validate_post_id( $course->get_lessons( 'ids' )[0], $request, 'post_id' ) ); - - } - -} diff --git a/web/favicon.png b/web/favicon.png deleted file mode 100644 index 63690781..00000000 Binary files a/web/favicon.png and /dev/null differ diff --git a/web/index.html b/web/index.html deleted file mode 100644 index fefe265a..00000000 --- a/web/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - LifterLMS REST API Reference - - - - - - - {{redocHead}} - - - {{redocBody}} - - diff --git a/web/redoc-config.yaml b/web/redoc-config.yaml deleted file mode 100644 index 3024c6ae..00000000 --- a/web/redoc-config.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# https://github.com/Rebilly/ReDoc/blob/master/src/theme.ts -theme: - logo: - gutter: 20px - colors: - primary: - main: '#466dd8' - typography: - headings: - fontFamily: 'Montserrat' - fontWeight: 600 - fontFamily: 'Montserrat' - fontWeight: 300 - fontSize: 16px - rightPanel: - backgroundColor: '#222' - -noAutoAuth: true -requiredPropsFirst: true -sortPropsAlphabetically: true - -# Use a specific build version -# redocURL: https://cdn.jsdelivr.net/npm/redoc@2.0.0-rc.11/bundles/redoc.standalone.js