-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a manifest.json to flow monorepo (#1355)
- Loading branch information
1 parent
63df803
commit e40fa45
Showing
7 changed files
with
230 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"name": "Flow PHP", | ||
"packages": [ | ||
{ | ||
"name" : "flow-php/etl", | ||
"path": "src/core/etl", | ||
"type": "core" | ||
}, | ||
{ | ||
"name" : "flow-php/cli", | ||
"path": "src/cli", | ||
"type": "cli" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-avro", | ||
"path": "src/adapter/etl-adapter-avro", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-chartjs", | ||
"path": "src/adapter/etl-adapter-chartjs", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-csv", | ||
"path": "src/adapter/etl-adapter-csv", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-doctrine", | ||
"path": "src/adapter/etl-adapter-doctrine", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-elasticsearch", | ||
"path": "src/adapter/etl-adapter-elasticsearch", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-google-sheet", | ||
"path": "src/adapter/etl-adapter-google-sheet", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-http", | ||
"path": "src/adapter/etl-adapter-http", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-json", | ||
"path": "src/adapter/etl-adapter-json", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-logger", | ||
"path": "src/adapter/etl-adapter-logger", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-meilisearch", | ||
"path": "src/adapter/etl-adapter-meilisearch", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-parquet", | ||
"path": "src/adapter/etl-adapter-parquet", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-text", | ||
"path": "src/adapter/etl-adapter-text", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/etl-adapter-xml", | ||
"path": "src/adapter/etl-adapter-xml", | ||
"type": "adapter" | ||
}, | ||
{ | ||
"name" : "flow-php/filesystem-async-aws-bridge", | ||
"path": "src/bridge/filesystem/async-aws", | ||
"type": "bridge" | ||
}, | ||
{ | ||
"name" : "flow-php/filesystem-azure-bridge", | ||
"path": "src/bridge/filesystem/azure", | ||
"type": "bridge" | ||
}, | ||
{ | ||
"name" : "flow-php/monolog-http-bridge", | ||
"path": "src/bridge/monolog/http", | ||
"type": "bridge" | ||
}, | ||
{ | ||
"name" : "flow-php/symfony-http-foundation", | ||
"path": "src/bridge/symfony/http-foundation", | ||
"type": "bridge" | ||
}, | ||
{ | ||
"name" : "flow-php/array-dot", | ||
"path": "src/lib/array-dot", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/azure-sdk", | ||
"path": "src/lib/azure-sdk", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/doctrine-dbal-bulk", | ||
"path": "src/lib/doctrine-dbal-bulk", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/dremel", | ||
"path": "src/lib/dremel", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/filesystem", | ||
"path": "src/lib/filesystem", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/parquet", | ||
"path": "src/lib/parquet", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/parquet-viewer", | ||
"path": "src/lib/parquet-viewer", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/rdsl", | ||
"path": "src/lib/rdsl", | ||
"type": "lib" | ||
}, | ||
{ | ||
"name" : "flow-php/snappy", | ||
"path": "src/lib/snappy", | ||
"type": "lib" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/tools/documentation/src/Flow/Documentation/Manifest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\Documentation; | ||
|
||
use Flow\Documentation\Manifest\{Package, Type}; | ||
|
||
final readonly class Manifest | ||
{ | ||
/** | ||
* @var array<Package> | ||
*/ | ||
public array $packages; | ||
|
||
public function __construct(Package ...$packages) | ||
{ | ||
$this->packages = $packages; | ||
} | ||
|
||
public static function fromJson(string $json) : self | ||
{ | ||
return new self(...\array_map( | ||
static fn (array $package) => new Package($package['name'], $package['path'], Type::from($package['type'])), | ||
\json_decode($json, true, 512, \JSON_THROW_ON_ERROR)['packages'] | ||
)); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/tools/documentation/src/Flow/Documentation/Manifest/Package.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\Documentation\Manifest; | ||
|
||
final readonly class Package | ||
{ | ||
public function __construct(public string $name, public string $path, public Type $type) | ||
{ | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/tools/documentation/src/Flow/Documentation/Manifest/Type.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\Documentation\Manifest; | ||
|
||
enum Type : string | ||
{ | ||
case ADAPTER = 'adapter'; | ||
case BRIDGE = 'bridge'; | ||
case CLI = 'cli'; | ||
case CORE = 'core'; | ||
case LIB = 'lib'; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/tools/documentation/tests/Flow/Documentation/Tests/Integration/ManifestTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\Documentation\Tests\Integration; | ||
|
||
use Flow\Documentation\Manifest; | ||
use Flow\ETL\Tests\FlowTestCase; | ||
|
||
final class ManifestTest extends FlowTestCase | ||
{ | ||
public function test_manifest() : void | ||
{ | ||
$manifest = Manifest::fromJson(\file_get_contents($this->repositoryRoot() . '/manifest.json')); | ||
self::assertCount(28, $manifest->packages); | ||
|
||
foreach ($manifest->packages as $package) { | ||
self::assertFileExists($this->repositoryRoot() . '/' . $package->path); | ||
} | ||
} | ||
} |