OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
knoblyExpressLandingPage
/
vendor
/
aws
/
aws-sdk-php
/
build
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/21/2024 10:02:53 AM
rwxr-xr-x
📄
Burgomaster.php
13.48 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
ClassAnnotationUpdater.php
3.3 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
ClientAnnotator.php
4.57 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
JsonCompiler.php
2.48 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
PhpFileLinterTrait.php
1.44 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
ServiceBuilder.php
1.85 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
annotate-client-locator.php
1.04 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
annotate-clients.php
2.74 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
aws-clear-cache.php
91 bytes
08/21/2024 10:02:23 AM
rw-r--r--
📄
build-manifest.php
3.57 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
build-redirect-map.php
343 bytes
08/21/2024 10:02:23 AM
rw-r--r--
📄
build-service.php
1015 bytes
08/21/2024 10:02:23 AM
rw-r--r--
📁
changelog
-
08/21/2024 10:02:52 AM
rwxr-xr-x
📄
compile-json.php
447 bytes
08/21/2024 10:02:23 AM
rw-r--r--
📁
docs
-
08/21/2024 10:05:50 AM
rwxr-xr-x
📄
docs.php
1.72 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
gh-release.php
6.01 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
normalize-docs-files.php
7.74 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
option-docs.php
1.21 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
packager.php
2.2 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
phar-test-runner.php
161 bytes
08/21/2024 10:02:23 AM
rw-r--r--
📄
remove-method-annotations.php
1.4 KB
08/21/2024 10:02:23 AM
rw-r--r--
📄
test-phar.php
1.05 KB
08/21/2024 10:02:24 AM
rw-r--r--
Editing: build-manifest.php
Close
<?php /* * This file is responsible for building up the API manifest file, including * determining the latest API version and hooking up endpoint prefix names * with client namespace names. */ $compatibleApiVersions = [ 'apigateway' => [ 'latest' => [ '2015-06-01', ], ], 'cloudfront' => [ 'latest' => [ '2016-01-13', '2015-09-17', ], '2015-07-27' => [ '2015-04-17', '2014-11-06' ], ], 'ec2' => [ 'latest' => [ '2015-04-15', ], ], 'events' => [ 'latest' => [ '2014-02-03', ], ], 'inspector' => [ 'latest' => [ '2015-08-18', ] ], ]; // Create a list of possible namespaces so that we can include it in the // manifest. $possibleNamespaces = []; $skip = ['.', '..', 'Api', 'data', 'Multipart', 'Signature']; foreach (scandir(__DIR__ . '/../src') as $dir) { if (!in_array($dir, $skip) && is_dir(__DIR__ . '/../src/' . $dir)) { $possibleNamespaces[strtolower($dir)] = $dir; } } $manifest = []; foreach (glob(__DIR__ . '/../src/data/**/**/api-2.json') as $file) { $model = json_decode(file_get_contents($file), true); preg_match('@src/data/([^/]+)/[0-9]{4}-[0-9]{2}-[0-9]{2}/api-2.json$@', $file, $matches); $identifier = $matches[1]; $metadata = $model['metadata'] + ['compatibleApiVersions' => []]; if (empty($manifest[$identifier])) { // Calculate a namespace for the service. $ns = isset($metadata['serviceAbbreviation']) ? $metadata['serviceAbbreviation'] : $metadata['serviceFullName']; $ns = str_replace(['Amazon', 'AWS', 'Beta', '(', ')', ' ', '/', '-'], '', $ns); //check if it's a grandfathered namespace $grandfatheredServices = json_decode( file_get_contents(__DIR__ . '/../src/data/grandfathered-services.json'), true )['grandfathered-services']; if (!in_array($ns, $grandfatheredServices)) { $ns = str_replace(' ', '', ucwords($metadata['serviceId'])); } if (!isset($possibleNamespaces[strtolower($ns)])) { throw new \Exception('NS not found: ' . $ns); } $ns = $possibleNamespaces[strtolower($ns)]; $manifest[$identifier] = [ 'namespace' => $ns, 'versions' => [], ]; } $manifest[$identifier]['versions'][$metadata['apiVersion']] = $metadata['apiVersion']; $serviceIdentifier = isset($metadata['serviceId']) ? str_replace(' ', '_', strtolower($metadata['serviceId'])) : ''; if (!empty($serviceIdentifier)) { $manifest[$identifier]['serviceIdentifier'] = $serviceIdentifier; } } foreach ($manifest as $identifier => &$metadata) { $metadata['versions']['latest'] = max(array_keys($metadata['versions'])); foreach ($metadata['versions'] as $name => $version) { if (isset($compatibleApiVersions[$identifier][$name])) { foreach ($compatibleApiVersions[$identifier][$name] as $compatVersion) { $metadata['versions'][$compatVersion] = $metadata['versions'][$name]; } } } krsort($metadata['versions']); } $data = json_encode($manifest, JSON_PRETTY_PRINT); $file = __DIR__ . '/../src/data/manifest.json'; file_put_contents($file, "$data\n"); echo "Wrote the following data to {$file}:\n>>>>>\n{$data}<<<<<\n";