diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 607c866e..add9b3d7 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -14,16 +14,19 @@ jobs: matrix: os: [ubuntu-latest] php: - - "7.1" - - "7.2" - - "7.3" + #- "7.1" + #- "7.2" + #- "7.3" - "7.4" - "8.0" - "8.1" + - "8.2" + - "8.3" dependencies: - "lowest" - "highest" - symfony-yaml: ['^3.4', '^4', '^5', '^6'] + #symfony-yaml: ['^3.4', '^4', '^5', '^6', '^7'] + symfony-yaml: ['^5', '^6', '^7'] include: - os: "windows-latest" php: "8.0" @@ -35,22 +38,29 @@ jobs: symfony-yaml: '^5' exclude: # symfony/yaml v5 does not run on PHP 7.1 - - php: '7.1' - symfony-yaml: '^5' + #- php: '7.1' + # symfony-yaml: '^5' # symfony/yaml v6 does not run on PHP 7.* - - php: '7.1' - symfony-yaml: '^6' - - php: '7.2' - symfony-yaml: '^6' - - php: '7.3' - symfony-yaml: '^6' + #- php: '7.1' + # symfony-yaml: '^6' + #- php: '7.2' + # symfony-yaml: '^6' + #- php: '7.3' + # symfony-yaml: '^6' - php: '7.4' symfony-yaml: '^6' - # symfony/yaml v3.4 is not compatible with PHP 8.0 but has no upper-bound, so it installs on it + # symfony/yaml v7 does not run on PHP <8.2 + - php: '7.4' + symfony-yaml: '^7' - php: '8.0' - symfony-yaml: '^3.4' + symfony-yaml: '^7' - php: '8.1' - symfony-yaml: '^3.4' + symfony-yaml: '^7' + # symfony/yaml v3.4 is not compatible with PHP 8.0 but has no upper-bound, so it installs on it + #- php: '8.0' + # symfony-yaml: '^3.4' + #- php: '8.1' + # symfony-yaml: '^3.4' runs-on: ${{ matrix.os }} @@ -69,7 +79,7 @@ jobs: - name: Require newer phpunit/phpunit version run: "composer require phpunit/phpunit '^9.5' --dev --no-interaction --ansi --no-install" - if: matrix.php == '8.1' + if: matrix.php == '8.1' || matrix.php == '8.2' || matrix.php == '8.3' - name: "Install dependencies with Composer" uses: "ramsey/composer-install@v2" diff --git a/Makefile b/Makefile index ee99b2ac..7d9358f0 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,10 @@ fix-style: php-cs-fixer.phar $(DOCKER_PHP) vendor/bin/indent --spaces .php_cs.dist $(DOCKER_PHP) ./php-cs-fixer.phar fix src/ --diff -install: composer.lock yarn.lock +cli: + docker-compose run --rm php bash + +install: composer.json package.json $(DOCKER_PHP) composer install --prefer-dist --no-interaction --no-progress --ansi $(DOCKER_NODE) yarn install @@ -82,4 +85,3 @@ coverage: .php-openapi-covA .php-openapi-covB grep -rhPo '^class \w+' src/spec/ | awk '{print $$2}' |grep -v '^Type$$' | sort > $@ .PHONY: all check-style fix-style install test lint coverage - diff --git a/README.md b/README.md index 3d25df05..d7cd0715 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ do awesome work: - [cebe/yii2-app-api](https://github.com/cebe/yii2-app-api) Yii framework application template for developing API-first applications. - [league/openapi-psr7-validator](https://github.com/thephpleague/openapi-psr7-validator) validates PSR-7 messages (HTTP request/response) against OpenAPI descriptions. - [dsuurlant/response2schema](https://github.com/dsuurlant/response2schema) a quick and easy tool for generating OpenAPI schemas based on example data. +- [hotmeteor/spectator](https://github.com/hotmeteor/spectator) a light-weight OpenAPI testing tool for existing Laravel test suite. +- [googoogajoob/openapi-slim4](https://github.com/googoogajoob/openapi-slim4) Configure the paths of a slim4 application from an openapi definition. - ... ([add yours](https://github.com/cebe/php-openapi/edit/master/README.md#L24)) ## Usage @@ -120,6 +122,40 @@ foreach($openapi->paths as $path => $definition) { Object properties are exactly like in the [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#openapi-specification). You may also access additional properties added by [specification extensions](https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#specificationExtensions). +Read a component schema and its properties for below spec: + +```yaml +openapi: 3.0.0 +info: + title: Test API + version: 1.0.0 +paths: + /foo: + put: + description: create foo + responses: + '200': + description: request succeeded +components: + schemas: + Foo: + description: This is an description + type: object + properties: + message: + type: string + code: + type: number +``` + +```php +# read a component schema +$foo = $openapi->components->schemas['Foo']; + +# read a property of schema +$foo->properties['message'] +``` + ### Writing API Description Files ```php diff --git a/bin/php-openapi b/bin/php-openapi index ae2ffdc8..aa4b0697 100755 --- a/bin/php-openapi +++ b/bin/php-openapi @@ -215,7 +215,7 @@ switch ($command) { if ($outputFile === null) { if ($outputFormat === null) { - error("No output fromat specified, please specify --write-json or --write-yaml.", "usage"); + error("No output format specified, please specify --write-json or --write-yaml.", "usage"); } elseif ($outputFormat === 'json') { fwrite(STDOUT, \cebe\openapi\Writer::writeToJson($openApi)); } else { diff --git a/composer.json b/composer.json index 46cb26f2..3dbff339 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ "require": { "php": ">=7.1.0", "ext-json": "*", - "symfony/yaml": "^3.4 || ^4 || ^5 || ^6", - "justinrainbow/json-schema": "^5.2" + "symfony/yaml": "^3.4 || ^4 || ^5 || ^6 || ^7.0", + "justinrainbow/json-schema": "^5.2 || ^6.0" }, "require-dev": { "cebe/indent": "*", @@ -30,7 +30,7 @@ "mermade/openapi3-examples": "1.0.0", "apis-guru/openapi-directory": "1.0.0", "nexmo/api-specification": "1.0.0", - "phpstan/phpstan": "^0.12.0" + "phpstan/phpstan": "^0.12.0 || ^1.9" }, "conflict": { "symfony/yaml": "3.4.0 - 3.4.4 || 4.0.0 - 4.4.17 || 5.0.0 - 5.1.9 || 5.2.0" @@ -81,7 +81,7 @@ "source": { "url": "https://github.com/APIs-guru/openapi-directory", "type": "git", - "reference": "openapi3.0.0" + "reference": "9d2e0b6696a230a182d740a8e97ba27fb41b13bd" } } }, @@ -91,9 +91,9 @@ "name": "nexmo/api-specification", "version": "1.0.0", "source": { - "url": "https://github.com/Nexmo/api-specification", + "url": "https://github.com/cebe/nexmo-api-specification", "type": "git", - "reference": "voice-2.0.0" + "reference": "590fadf21f528ed8e05f6ff47c2e49d81f50a181" } } } diff --git a/src/RawSpecDataInterface.php b/src/RawSpecDataInterface.php new file mode 100644 index 00000000..3fecc1f0 --- /dev/null +++ b/src/RawSpecDataInterface.php @@ -0,0 +1,16 @@ + and contributors + * @license https://github.com/cebe/php-openapi/blob/master/LICENSE + */ + +namespace cebe\openapi; + +/** + * Make raw spec data available to the implementing classes + */ +interface RawSpecDataInterface +{ + public function getRawSpecData(): array; +} diff --git a/src/ReferenceContext.php b/src/ReferenceContext.php index bde0a964..868ec920 100644 --- a/src/ReferenceContext.php +++ b/src/ReferenceContext.php @@ -121,10 +121,18 @@ private function reduceDots($path) unset($parts[$i]); continue; } - if ($i > 0 && $parts[$i] === '..' && $parts[$i - $parentOffset] !== '..') { - unset($parts[$i - $parentOffset]); + + if ($i > 0 && $parts[$i] === '..') { + $parent = $i - $parentOffset; + //Make sure parent exists, if not, check the next parent etc + while ($parent >= 0 && empty($parts[$parent])) { + $parent--; + } + //Confirm parent is valid + if (!empty($parts[$parent]) && $parts[$parent] !== '..') { + unset($parts[$parent]); + } unset($parts[$i]); - $parentOffset += 2; } } return '/'.implode('/', $parts); diff --git a/src/SpecBaseObject.php b/src/SpecBaseObject.php index 1de429bd..ef93401e 100644 --- a/src/SpecBaseObject.php +++ b/src/SpecBaseObject.php @@ -20,8 +20,9 @@ * Implements property management and validation basics. * */ -abstract class SpecBaseObject implements SpecObjectInterface, DocumentContextInterface +abstract class SpecBaseObject implements SpecObjectInterface, DocumentContextInterface, RawSpecDataInterface { + private $_rawSpec; private $_properties = []; private $_errors = []; @@ -63,6 +64,7 @@ abstract protected function performValidation(); */ public function __construct(array $data) { + $this->_rawSpec = $data; foreach ($this->attributes() as $property => $type) { if (!isset($data[$property])) { continue; @@ -525,4 +527,9 @@ public function getExtensions(): array } return $extensions; } + + public function getRawSpecData(): array + { + return $this->_rawSpec; + } } diff --git a/src/spec/OpenApi.php b/src/spec/OpenApi.php index 29d38b38..4a8aa243 100644 --- a/src/spec/OpenApi.php +++ b/src/spec/OpenApi.php @@ -7,7 +7,6 @@ namespace cebe\openapi\spec; -use cebe\openapi\exceptions\TypeErrorException; use cebe\openapi\SpecBaseObject; /** @@ -38,7 +37,7 @@ protected function attributes(): array 'servers' => [Server::class], 'paths' => Paths::class, 'components' => Components::class, - 'security' => [SecurityRequirement::class], + 'security' => SecurityRequirements::class, 'tags' => [Tag::class], 'externalDocs' => ExternalDocumentation::class, ]; diff --git a/src/spec/Operation.php b/src/spec/Operation.php index b0525327..8becca10 100644 --- a/src/spec/Operation.php +++ b/src/spec/Operation.php @@ -46,7 +46,7 @@ protected function attributes(): array 'responses' => Responses::class, 'callbacks' => [Type::STRING, Callback::class], 'deprecated' => Type::BOOLEAN, - 'security' => [SecurityRequirement::class], + 'security' => SecurityRequirements::class, 'servers' => [Server::class], ]; } diff --git a/src/spec/PathItem.php b/src/spec/PathItem.php index 4b2debcd..6930e0af 100644 --- a/src/spec/PathItem.php +++ b/src/spec/PathItem.php @@ -180,7 +180,7 @@ public function resolveReferences(ReferenceContext $context = null) foreach ($this->$attribute as $k => $item) { if ($item instanceof Reference) { $referencedObject = $item->resolve(); - $this->$attribute = [$k => $referencedObject] + $this->$attribute; + $this->$attribute = $this->$attribute + [$k => $referencedObject]; if (!$referencedObject instanceof Reference && $referencedObject !== null) { $referencedObject->resolveReferences(); } diff --git a/src/spec/Reference.php b/src/spec/Reference.php index cda612a9..f9b84d67 100644 --- a/src/spec/Reference.php +++ b/src/spec/Reference.php @@ -8,16 +8,15 @@ namespace cebe\openapi\spec; use cebe\openapi\DocumentContextInterface; -use cebe\openapi\exceptions\IOException; use cebe\openapi\exceptions\TypeErrorException; use cebe\openapi\exceptions\UnresolvableReferenceException; use cebe\openapi\json\InvalidJsonPointerSyntaxException; use cebe\openapi\json\JsonPointer; use cebe\openapi\json\JsonReference; use cebe\openapi\json\NonexistentJsonPointerReferenceException; +use cebe\openapi\RawSpecDataInterface; use cebe\openapi\ReferenceContext; use cebe\openapi\SpecObjectInterface; -use Symfony\Component\Yaml\Yaml; /** * Reference Object @@ -27,8 +26,14 @@ * @link https://tools.ietf.org/html/rfc6901 * */ -class Reference implements SpecObjectInterface, DocumentContextInterface +class Reference implements SpecObjectInterface, DocumentContextInterface, RawSpecDataInterface { + /** + * Holds raw spec data + * @var array + */ + private $_rawSpec; + /** * @var string */ @@ -61,11 +66,12 @@ class Reference implements SpecObjectInterface, DocumentContextInterface /** * Create an object from spec data. * @param array $data spec data read from YAML or JSON - * @param string $to class name of the type referenced by this Reference + * @param string|null $to class name of the type referenced by this Reference * @throws TypeErrorException in case invalid data is supplied. */ public function __construct(array $data, string $to = null) { + $this->_rawSpec = $data; if (!isset($data['$ref'])) { throw new TypeErrorException( "Unable to instantiate Reference Object with data '" . print_r($data, true) . "'." @@ -402,4 +408,9 @@ public function getDocumentPosition(): ?JsonPointer { return $this->_jsonPointer; } + + public function getRawSpecData(): array + { + return $this->_rawSpec; + } } diff --git a/src/spec/SecurityRequirement.php b/src/spec/SecurityRequirement.php index 71f805c8..ec3e1d90 100644 --- a/src/spec/SecurityRequirement.php +++ b/src/spec/SecurityRequirement.php @@ -10,13 +10,20 @@ use cebe\openapi\SpecBaseObject; /** - * Lists the required security schemes to execute this operation. + * A required security scheme to execute this operation. * * @link https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#securityRequirementObject * */ class SecurityRequirement extends SpecBaseObject { + private $_securityRequirement; + public function __construct(array $data) + { + parent::__construct($data); + $this->_securityRequirement = $data; + } + /** * @return array array of attributes available in this object. */ @@ -34,4 +41,9 @@ protected function attributes(): array protected function performValidation() { } + + public function getSerializableData() + { + return $this->_securityRequirement; + } } diff --git a/src/spec/SecurityRequirements.php b/src/spec/SecurityRequirements.php new file mode 100644 index 00000000..cbda1ba7 --- /dev/null +++ b/src/spec/SecurityRequirements.php @@ -0,0 +1,78 @@ + and contributors + * @license https://github.com/cebe/php-openapi/blob/master/LICENSE + */ + +namespace cebe\openapi\spec; + +use cebe\openapi\SpecBaseObject; + +/** + * Lists the required security schemes to execute this operation. + * + * @link https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#securityRequirementObject + * + */ +class SecurityRequirements extends SpecBaseObject +{ + private $_securityRequirements; + + public function __construct(array $data) + { + parent::__construct($data); + + foreach ($data as $index => $value) { + if (is_numeric($index)) { // read + $this->_securityRequirements[array_keys($value)[0]] = new SecurityRequirement(array_values($value)[0]); + } else { // write + $this->_securityRequirements[$index] = $value; + } + } + if ($data === []) { + $this->_securityRequirements = []; + } + } + + /** + * @return array array of attributes available in this object. + */ + protected function attributes(): array + { + // this object does not have a fixed set of attribute names + return []; + } + + /** + * Perform validation on this object, check data against OpenAPI Specification rules. + * + * Call `addError()` in case of validation errors. + */ + protected function performValidation() + { + } + + /** + * {@inheritDoc} + */ + public function getSerializableData() + { + $data = []; + foreach ($this->_securityRequirements ?? [] as $name => $securityRequirement) { + /** @var SecurityRequirement $securityRequirement */ + $data[] = [$name => $securityRequirement->getSerializableData()]; + } + return $data; + } + + public function getRequirement(string $name) + { + return $this->_securityRequirements[$name] ?? null; + } + + public function getRequirements() + { + return $this->_securityRequirements; + } +} diff --git a/tests/IssueTest.php b/tests/IssueTest.php new file mode 100644 index 00000000..a350d5b7 --- /dev/null +++ b/tests/IssueTest.php @@ -0,0 +1,13 @@ +assertInstanceOf(\cebe\openapi\SpecObjectInterface::class, $openapi); + } +} diff --git a/tests/ReaderTest.php b/tests/ReaderTest.php index 589b7cbb..eee95951 100644 --- a/tests/ReaderTest.php +++ b/tests/ReaderTest.php @@ -128,6 +128,114 @@ public function testSymfonyYamlBugHunt() $this->assertEquals($expectedArray, $inlineYamlExample); } + public function testGetRawSpecData() + { + $spec = <<assertSame($openapi->getRawSpecData(), [ + 'openapi' => '3.0.0', + 'info' => [ + 'version' => '1.0.0', + 'title' => 'Check storage of raw spec data', + ], + 'paths' => [ + '/' => [ + 'get' => [ + 'summary' => 'List', + 'operationId' => 'list', + 'responses' => [ + '200' => [ + 'description' => 'The information', + ] + ] + ] + ] + ], + 'components' => [ + 'schemas' => [ + 'User' => [ + 'type' => 'object', + 'properties' => [ + 'id' => [ + 'type' => 'integer', + ], + 'name' => [ + 'type' => 'string', + ] + ] + ], + 'Post' => [ + 'type' => 'object', + 'properties' => [ + 'id' => [ + 'type' => 'integer', + ], + 'title' => [ + 'type' => 'string', + ], + 'user' => [ + '$ref' => '#/components/schemas/User', + ] + ] + ] + ] + ] + ]); + + $this->assertSame($openapi->components->schemas['User']->getRawSpecData(), [ + 'type' => 'object', + 'properties' => [ + 'id' => [ + 'type' => 'integer', + ], + 'name' => [ + 'type' => 'string', + ] + ] + ]); + + $this->assertSame($openapi->components->schemas['Post']->properties['user']->getRawSpecData(), [ + '$ref' => '#/components/schemas/User', + ]); + + } + // TODO test invalid JSON // TODO test invalid YAML diff --git a/tests/ReferenceContextTest.php b/tests/ReferenceContextTest.php index b06eb5fc..dad12c1f 100644 --- a/tests/ReferenceContextTest.php +++ b/tests/ReferenceContextTest.php @@ -179,6 +179,22 @@ public function normalizeUriProvider() '/var/www/api/../definitions.yaml', 'file:///var/www/definitions.yaml', ], + [ + '/./definitions.yaml', + 'file:///definitions.yaml', + ], + [ + '/var/www/api/schema/../../definitions.yaml', + 'file:///var/www/definitions.yaml', + ], + [ + '/var/www/api/schema/./../data/./../definitions.yaml', + 'file:///var/www/api/definitions.yaml', + ], + [ + '/var/www/api/schema/./../definitions.yaml', + 'file:///var/www/api/definitions.yaml', + ], [ '/var/www/api/../definitions.yaml#/components/Pet', 'file:///var/www/definitions.yaml#/components/Pet', diff --git a/tests/WriterTest.php b/tests/WriterTest.php index fc415b51..355a7449 100644 --- a/tests/WriterTest.php +++ b/tests/WriterTest.php @@ -1,6 +1,13 @@ createOpenAPI([ - 'security' => [new SecurityRequirement(['Bearer' => []])], + 'security' => new SecurityRequirements([ + 'Bearer' => new SecurityRequirement([]) + ]), ]); $json = \cebe\openapi\Writer::writeToJson($openapi); @@ -166,7 +175,9 @@ public function testWriteEmptySecurityPartJson() public function testWriteEmptySecurityPartYaml() { $openapi = $this->createOpenAPI([ - 'security' => [new SecurityRequirement(['Bearer' => []])], + 'security' => new SecurityRequirements([ + 'Bearer' => new SecurityRequirement([]) + ]), ]); $yaml = \cebe\openapi\Writer::writeToYaml($openapi); @@ -182,6 +193,105 @@ public function testWriteEmptySecurityPartYaml() - Bearer: [] +YAML + ), + $yaml + ); + } + + public function testSecurityAtPathOperationLevel() + { + $openapi = $this->createOpenAPI([ + 'components' => new Components([ + 'securitySchemes' => [ + 'BearerAuth' => new SecurityScheme([ + 'type' => 'http', + 'scheme' => 'bearer', + 'bearerFormat' => 'AuthToken and JWT Format' # optional, arbitrary value for documentation purposes + ]), + ], + ]), + 'paths' => [ + '/test' => new PathItem([ + 'get' => new Operation([ + 'security' => new SecurityRequirements([ + 'BearerAuth' => new SecurityRequirement([]), + ]), + 'responses' => new Responses([ + 200 => new Response(['description' => 'OK']), + ]) + ]) + ]) + ] + ]); + + $yaml = \cebe\openapi\Writer::writeToYaml($openapi); + + + $this->assertEquals(preg_replace('~\R~', "\n", <<createOpenAPI([ + 'components' => new Components([ + 'securitySchemes' => [ + 'BearerAuth' => new SecurityScheme([ + 'type' => 'http', + 'scheme' => 'bearer', + 'bearerFormat' => 'AuthToken and JWT Format' # optional, arbitrary value for documentation purposes + ]) + ], + ]), + 'security' => new SecurityRequirements([ + 'BearerAuth' => new SecurityRequirement([]) + ]), + 'paths' => [], + ]); + + $yaml = \cebe\openapi\Writer::writeToYaml($openapi); + + + $this->assertEquals(preg_replace('~\R~', "\n", <<assertInstanceOf(\cebe\openapi\spec\Components::class, $openapi->components); // security - $this->assertAllInstanceOf(\cebe\openapi\spec\SecurityRequirement::class, $openapi->security); + $this->assertNull($openapi->security); # since it is not present in spec // tags $this->assertAllInstanceOf(\cebe\openapi\spec\Tag::class, $openapi->tags); @@ -221,7 +221,8 @@ public function testSpecs($openApiFile) } // security - $this->assertAllInstanceOf(\cebe\openapi\spec\SecurityRequirement::class, $openapi->security); + $openapi->security !== null && $this->assertInstanceOf(\cebe\openapi\spec\SecurityRequirements::class, $openapi->security); + $openapi->security !== null && $this->assertAllInstanceOf(\cebe\openapi\spec\SecurityRequirement::class, $openapi->security->getRequirements()); // tags $this->assertAllInstanceOf(\cebe\openapi\spec\Tag::class, $openapi->tags); diff --git a/tests/spec/OperationTest.php b/tests/spec/OperationTest.php index 6e30566f..734db321 100644 --- a/tests/spec/OperationTest.php +++ b/tests/spec/OperationTest.php @@ -79,10 +79,11 @@ public function testRead() $this->assertInstanceOf(\cebe\openapi\spec\Responses::class, $operation->responses); - $this->assertCount(1, $operation->security); - $this->assertInstanceOf(\cebe\openapi\spec\SecurityRequirement::class, $operation->security[0]); - $this->assertCount(2, $operation->security[0]->petstore_auth); - $this->assertEquals(['write:pets', 'read:pets'], $operation->security[0]->petstore_auth); + $this->assertCount(1, $operation->security->getRequirements()); + $this->assertInstanceOf(\cebe\openapi\spec\SecurityRequirements::class, $operation->security); + $this->assertInstanceOf(\cebe\openapi\spec\SecurityRequirement::class, $operation->security->getRequirement('petstore_auth')); + $this->assertCount(2, $operation->security->getRequirement('petstore_auth')->getSerializableData()); + $this->assertEquals(['write:pets', 'read:pets'], $operation->security->getRequirement('petstore_auth')->getSerializableData()); $this->assertInstanceOf(ExternalDocumentation::class, $operation->externalDocs); $this->assertEquals('Find more info here', $operation->externalDocs->description); diff --git a/tests/spec/PathTest.php b/tests/spec/PathTest.php index 6c46e4b0..2d47e3e7 100644 --- a/tests/spec/PathTest.php +++ b/tests/spec/PathTest.php @@ -192,4 +192,71 @@ public function testPathItemReference() $this->assertEquals('A bar', $barPath->get->responses['200']->description); $this->assertEquals('non-existing resource', $barPath->get->responses['404']->description); } + + public function testPathParametersAreArrays() + { + $file = __DIR__ . '/data/path-params/openapi.yaml'; + /** @var $openapi \cebe\openapi\spec\OpenApi */ + $openapi = Reader::readFromYamlFile($file, \cebe\openapi\spec\OpenApi::class, true); + + $result = $openapi->validate(); + $this->assertEquals([], $openapi->getErrors(), print_r($openapi->getErrors(), true)); + $this->assertTrue($result); + + $this->assertInstanceOf(Paths::class, $openapi->paths); + $this->assertSame(gettype($openapi->paths->getPaths()), 'array'); + $this->assertInstanceOf(PathItem::class, $usersPath = $openapi->paths['/v1/organizations/{organizationId}/user']); + $this->assertInstanceOf(PathItem::class, $userIdPath = $openapi->paths['/v1/organizations/{organizationId}/user/{id}']); + + $result = $usersPath->validate(); + $this->assertTrue($result); + $this->assertSame(gettype($usersPath->parameters), 'array'); + $this->assertInstanceOf(\cebe\openapi\spec\Parameter::class, $usersPath->parameters[0]); + $this->assertInstanceOf(\cebe\openapi\spec\Parameter::class, $usersPath->parameters[1]); + $this->assertEquals('api-version', $usersPath->parameters[0]->name); + + $result = $userIdPath->validate(); + $this->assertTrue($result); + $this->assertSame(gettype($userIdPath->parameters), 'array'); + $this->assertInstanceOf(\cebe\openapi\spec\Parameter::class, $userIdPath->parameters[0]); + $this->assertInstanceOf(\cebe\openapi\spec\Parameter::class, $userIdPath->parameters[1]); + $this->assertEquals('id', $userIdPath->parameters[2]->name); + + $dirSep = DIRECTORY_SEPARATOR; + $output = dirname(__DIR__) . $dirSep . 'compiled.yml'; + shell_exec('php ' . dirname(__DIR__, 2) . "{$dirSep}bin{$dirSep}php-openapi inline " . $file . ' ' . $output); + + $baseExpected = dirname(__DIR__)."{$dirSep}data{$dirSep}issue{$dirSep}155{$dirSep}"; + $expected = $baseExpected.'compiled-symfony-7.yml'; + $version = static::symfonyYamlVersion(); + $majorVersion = explode('.', $version)[0]; + + if ($majorVersion == 6) { + $expected = $baseExpected."compiled-symfony-6.yml"; + if (version_compare(PHP_VERSION, '8.1', '>=') && version_compare($version, '6.0.0', '!=')) { + $expected = $baseExpected."compiled-symfony-7.yml"; + } + } elseif ($majorVersion == 5) { + $expected = $baseExpected."compiled-symfony-6.yml"; + } + if (stripos(PHP_OS, 'WIN') === 0) { # fixes https://github.com/cebe/php-openapi/actions/runs/14808968938/job/41581244210 + file_put_contents($expected, preg_replace('~\R~', "\n", file_get_contents($expected))); # not an ideal solution, can be refactored + } + + $this->assertFileEquals($output, $expected); + unlink($output); + } + + protected static function symfonyYamlVersion() + { + $package = 'symfony/yaml'; + $installed = json_decode(file_get_contents(__DIR__ . '/../../composer.lock'), true); + + foreach ($installed['packages'] as $pkg) { + if ($pkg['name'] === $package) { + return str_replace('v', '', $pkg['version']); + } + } + return '7.0.0'; + } } diff --git a/tests/spec/SecuritySchemeTest.php b/tests/spec/SecuritySchemeTest.php index 5e14d5f7..4dc6a2a1 100644 --- a/tests/spec/SecuritySchemeTest.php +++ b/tests/spec/SecuritySchemeTest.php @@ -11,6 +11,7 @@ * @covers \cebe\openapi\spec\OAuthFlows * @covers \cebe\openapi\spec\OAuthFlow * @covers \cebe\openapi\spec\SecurityRequirement + * @covers \cebe\openapi\spec\SecurityRequirements */ class SecuritySchemeTest extends \PHPUnit\Framework\TestCase { @@ -199,10 +200,10 @@ public function testDefaultSecurity() YAML ); - $this->assertSame([], $openapi->paths->getPath('/path/one')->post->security); + $this->assertSame([], $openapi->paths->getPath('/path/one')->post->security->getRequirements()); $this->assertSame(null, $openapi->paths->getPath('/path/two')->post->security); - $this->assertCount(1, $openapi->security); - $this->assertSame([], $openapi->security[0]->Bearer); + $this->assertCount(1, $openapi->security->getRequirements()); + $this->assertSame([], $openapi->security->getRequirement('Bearer')->getSerializableData()); } } diff --git a/tests/spec/data/path-params/global.yaml b/tests/spec/data/path-params/global.yaml new file mode 100644 index 00000000..38348ee4 --- /dev/null +++ b/tests/spec/data/path-params/global.yaml @@ -0,0 +1,28 @@ +components: + parameters: + Version: + in: header + name: api-version + required: false + schema: + type: string + format: date + example: '2021-05-18' + description: The API version + OrganizationId: + in: path + name: organizationId + required: true + schema: + type: string + format: uuid + description: The Organization ID + responses: + BadRequest: + description: Bad Request + Forbidden: + description: Forbidden + NotFound: + description: Not Found + Success: + description: Success \ No newline at end of file diff --git a/tests/spec/data/path-params/openapi.yaml b/tests/spec/data/path-params/openapi.yaml new file mode 100644 index 00000000..9decce27 --- /dev/null +++ b/tests/spec/data/path-params/openapi.yaml @@ -0,0 +1,18 @@ +openapi: 3.0.0 +info: + version: "2021-05-18" + title: Test REST API + description: Specifications for the Test REST API. + contact: + name: bplainia + email: bplainia@lhespotlight.org + +servers: + - url: 'http://localhost:8000' + description: 'Test' + +paths: + /v1/organizations/{organizationId}/user: + $ref: 'user.yaml#/paths/Users' + /v1/organizations/{organizationId}/user/{id}: + $ref: 'user.yaml#/paths/UserId' \ No newline at end of file diff --git a/tests/spec/data/path-params/user.yaml b/tests/spec/data/path-params/user.yaml new file mode 100644 index 00000000..6f1402bd --- /dev/null +++ b/tests/spec/data/path-params/user.yaml @@ -0,0 +1,79 @@ + +paths: + Users: + parameters: + - $ref: 'global.yaml#/components/parameters/Version' + - $ref: 'global.yaml#/components/parameters/OrganizationId' + post: + summary: Creates a user + tags: + - pets + security: + - BearerAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/User' + responses: + '201': + description: Created + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/User' + '400': + $ref: 'global.yaml#/components/responses/BadRequest' + '403': + $ref: 'global.yaml#/components/responses/Forbidden' + UserId: + parameters: + - $ref: 'global.yaml#/components/parameters/Version' + - $ref: 'global.yaml#/components/parameters/OrganizationId' + - $ref: '#/components/parameters/UserId' + get: + summary: Gets a user + security: + - BearerAuth: [] + responses: + '200': + description: A bar + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/User' + '400': + $ref: 'global.yaml#/components/responses/BadRequest' + '403': + $ref: 'global.yaml#/components/responses/Forbidden' + '404': + $ref: 'global.yaml#/components/responses/NotFound' +components: + schemas: + User: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + parameters: + UserId: + in: path + name: id + required: true + schema: + type: string + format: uuid + description: User's ID diff --git a/yarn.lock b/yarn.lock index fb2944f1..f33c60b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,11 +24,11 @@ js-tokens "^4.0.0" "@babel/runtime@^7.0.0", "@babel/runtime@^7.12.5": - version "7.17.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" - integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.0.tgz#fbee7cf97c709518ecc1f590984481d5460d4762" + integrity sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw== dependencies: - regenerator-runtime "^0.13.4" + regenerator-runtime "^0.14.0" "@cloudflare/json-schema-walker@^0.1.1": version "0.1.1" @@ -40,7 +40,7 @@ resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.0.0-rc.6.tgz#7985f681564cff4ffaebb5896eb4be20af3aae7a" integrity sha512-dDnQizD94EdBwEj/fh3zPRa/HWCS9O5au2PuHhZBbuM3xWHxuaKzPBOEWze7Nn0xW68MIpZ7Xdyn1CoCpjKCuQ== -accepts@~1.3.7: +accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -97,7 +97,7 @@ argparse@^1.0.7: array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== async@^1.4.0: version "1.5.2" @@ -122,26 +122,39 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -body-parser@1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.1.tgz#1499abbaa9274af3ecc9f6f10396c995943e31d4" - integrity sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA== +body-parser@1.20.3: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== dependencies: - bytes "3.1.1" - content-type "~1.0.4" + bytes "3.1.2" + content-type "~1.0.5" debug "2.6.9" - depd "~1.1.2" - http-errors "1.8.1" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.9.6" - raw-body "2.4.2" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" type-is "~1.6.18" + unpipe "1.0.0" -bytes@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a" - integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg== +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" call-me-maybe@^1.0.1: version "1.0.1" @@ -260,15 +273,20 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== +content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== -cookie@0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" - integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== +cookie@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" + integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== core-js@^3.2.1: version "3.21.0" @@ -276,9 +294,9 @@ core-js@^3.2.1: integrity sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ== cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + version "6.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.6.tgz#30d0efa0712ddb7eb5a76e1e8721bffafa6b5d57" + integrity sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -303,15 +321,24 @@ decko@^1.2.0: resolved "https://registry.yarnpkg.com/decko/-/decko-1.2.0.tgz#fd43c735e967b8013306884a56fbe665996b6817" integrity sha1-/UPHNelnuAEzBohKVvvmZZlraBc= -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== dom-walk@^0.1.0: version "0.1.2" @@ -326,7 +353,7 @@ dompurify@^1.0.10: ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== ejs@^2.5.2: version "2.7.4" @@ -346,7 +373,12 @@ emojis-list@^3.0.0: encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== end-of-stream@^1.1.0: version "1.4.4" @@ -355,6 +387,18 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es6-promise@^3.2.1: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" @@ -368,7 +412,7 @@ escalade@^3.1.1: escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== escape-string-regexp@^1.0.5: version "1.0.5" @@ -383,7 +427,7 @@ esprima@^4.0.0: etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== eventemitter3@^3.0.0: version "3.1.2" @@ -404,37 +448,38 @@ execa@^1.0.0: strip-eof "^1.0.0" express@^4.14.0: - version "4.17.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.2.tgz#c18369f265297319beed4e5558753cc8c1364cb3" - integrity sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg== + version "4.21.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.1.tgz#9dae5dda832f16b4eec941a4e44aa89ec481b281" + integrity sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ== dependencies: - accepts "~1.3.7" + accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.19.1" + body-parser "1.20.3" content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.4.1" + cookie "0.7.1" cookie-signature "1.0.6" debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" + depd "2.0.0" + encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "~1.1.2" + finalhandler "1.3.1" fresh "0.5.2" - merge-descriptors "1.0.1" + http-errors "2.0.0" + merge-descriptors "1.0.3" methods "~1.1.2" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" - path-to-regexp "0.1.7" + path-to-regexp "0.1.10" proxy-addr "~2.0.7" - qs "6.9.6" + qs "6.13.0" range-parser "~1.2.1" safe-buffer "5.2.1" - send "0.17.2" - serve-static "1.14.2" + send "0.19.0" + serve-static "1.16.2" setprototypeof "1.2.0" - statuses "~1.5.0" + statuses "2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" @@ -459,17 +504,17 @@ fast-safe-stringify@^2.0.7: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== dependencies: debug "2.6.9" - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" - statuses "~1.5.0" + statuses "2.0.1" unpipe "~1.0.0" find-up@^3.0.0: @@ -480,9 +525,9 @@ find-up@^3.0.0: locate-path "^3.0.0" foreach@^2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + version "2.0.6" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.6.tgz#87bcc8a1a0e74000ff2bf9802110708cfb02eb6e" + integrity sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg== format-util@^1.0.3: version "1.0.5" @@ -497,7 +542,12 @@ forwarded@0.2.0: fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== get-caller-file@^1.0.1: version "1.0.3" @@ -509,6 +559,17 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -524,6 +585,13 @@ global@^4.3.0: min-document "^2.19.0" process "^0.11.10" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + grapheme-splitter@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" @@ -534,6 +602,30 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -541,15 +633,15 @@ hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0: dependencies: react-is "^16.7.0" -http-errors@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" - integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: - depd "~1.1.2" + depd "2.0.0" inherits "2.0.4" setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" + statuses "2.0.1" toidentifier "1.0.1" http2-client@^1.2.5: @@ -630,9 +722,9 @@ js-yaml@^3.12.1, js-yaml@^3.2.3: esprima "^4.0.0" json-pointer@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.1.tgz#3c6caa6ac139e2599f5a1659d39852154015054d" - integrity sha512-3OvjqKdCBvH41DLpV4iSt6v2XhZXV1bPB4OROuknvUXI7ZQNofieCPkmE26stEJ9zdQuvIxDHCuYhfgxFAAs+Q== + version "0.6.2" + resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.2.tgz#f97bd7550be5e9ea901f8c9264c9d436a22a93cd" + integrity sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw== dependencies: foreach "^2.0.4" @@ -666,9 +758,9 @@ json-to-ast@^2.0.3: grapheme-splitter "^1.0.4" json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== dependencies: minimist "^1.2.0" @@ -697,9 +789,9 @@ leven@^3.1.0: integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== loader-utils@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== + version "1.4.2" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" + integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== dependencies: big.js "^5.2.2" emojis-list "^3.0.0" @@ -745,7 +837,7 @@ marked@^0.6.1: media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== mem@^4.0.0: version "4.3.0" @@ -761,27 +853,27 @@ memoize-one@^5.0.0: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -mime-db@1.51.0: - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.51.0" + mime-db "1.52.0" mime@1.6.0: version "1.6.0" @@ -801,9 +893,9 @@ min-document@^2.19.0: dom-walk "^0.1.0" minimist@^1.2.0: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== mobx-react@^5.4.3: version "5.4.4" @@ -816,7 +908,7 @@ mobx-react@^5.4.3: ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.3: version "2.1.3" @@ -936,10 +1028,15 @@ object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= +object-inspect@^1.13.1: + version "1.13.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" + integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" @@ -1029,10 +1126,10 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== perfect-scrollbar@^1.4.0: version "1.5.5" @@ -1047,9 +1144,9 @@ polished@^3.0.3: "@babel/runtime" "^7.12.5" prismjs@^1.15.0: - version "1.27.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" - integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== + version "1.30.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.30.0.tgz#d9709969d9d4e16403f6f348c63553b19f0975a9" + integrity sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw== process@^0.11.10: version "0.11.10" @@ -1081,23 +1178,25 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -qs@6.9.6: - version "6.9.6" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee" - integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32" - integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ== +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== dependencies: - bytes "3.1.1" - http-errors "1.8.1" + bytes "3.1.2" + http-errors "2.0.0" iconv-lite "0.4.24" unpipe "1.0.0" @@ -1174,10 +1273,10 @@ reftools@^1.1.0, reftools@^1.1.9: resolved "https://registry.yarnpkg.com/reftools/-/reftools-1.1.9.tgz#e16e19f662ccd4648605312c06d34e5da3a2b77e" integrity sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w== -regenerator-runtime@^0.13.4: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== require-directory@^2.1.1: version "2.1.1" @@ -1205,44 +1304,56 @@ secure-keys@^1.0.0: integrity sha1-8MgtmKOxOah3aogIBQuCRDEIf8o= semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -send@0.17.2: - version "0.17.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" - integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww== +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== dependencies: debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" + depd "2.0.0" + destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "1.8.1" + http-errors "2.0.0" mime "1.6.0" ms "2.1.3" - on-finished "~2.3.0" + on-finished "2.4.1" range-parser "~1.2.1" - statuses "~1.5.0" + statuses "2.0.1" -serve-static@1.14.2: - version "1.14.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.2.tgz#722d6294b1d62626d41b43a013ece4598d292bfa" - integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ== +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== dependencies: - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.17.2" + send "0.19.0" set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -1309,6 +1420,16 @@ should@^13.2.1: should-type-adaptors "^1.0.1" should-util "^1.0.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + signal-exit@^3.0.0: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -1348,10 +1469,10 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== stickyfill@^1.1.1: version "1.1.1" @@ -1460,17 +1581,17 @@ type-is@~1.6.18: unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== webidl-conversions@^3.0.0: version "3.0.1"