mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 19:21:33 +00:00
Build modified streamline images
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
This commit is contained in:
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\UnableToGeneratePublicUrl;
|
||||
|
||||
final class ChainedPublicUrlGenerator implements PublicUrlGenerator
|
||||
{
|
||||
/**
|
||||
* @param PublicUrlGenerator[] $generators
|
||||
*/
|
||||
public function __construct(private iterable $generators)
|
||||
{
|
||||
}
|
||||
|
||||
public function publicUrl(string $path, Config $config): string
|
||||
{
|
||||
foreach ($this->generators as $generator) {
|
||||
try {
|
||||
return $generator->publicUrl($path, $config);
|
||||
} catch (UnableToGeneratePublicUrl) {
|
||||
}
|
||||
}
|
||||
|
||||
throw new UnableToGeneratePublicUrl('No supported public url generator found.', $path);
|
||||
}
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\PathPrefixer;
|
||||
|
||||
class PrefixPublicUrlGenerator implements PublicUrlGenerator
|
||||
{
|
||||
private PathPrefixer $prefixer;
|
||||
|
||||
public function __construct(string $urlPrefix)
|
||||
{
|
||||
$this->prefixer = new PathPrefixer($urlPrefix, '/');
|
||||
}
|
||||
|
||||
public function publicUrl(string $path, Config $config): string
|
||||
{
|
||||
return $this->prefixer->prefixPath($path);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\UnableToGeneratePublicUrl;
|
||||
|
||||
interface PublicUrlGenerator
|
||||
{
|
||||
/**
|
||||
* @throws UnableToGeneratePublicUrl
|
||||
*/
|
||||
public function publicUrl(string $path, Config $config): string;
|
||||
}
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\PathPrefixer;
|
||||
|
||||
use function array_map;
|
||||
use function count;
|
||||
use function crc32;
|
||||
|
||||
final class ShardedPrefixPublicUrlGenerator implements PublicUrlGenerator
|
||||
{
|
||||
/** @var PathPrefixer[] */
|
||||
private array $prefixes;
|
||||
private int $count;
|
||||
|
||||
/**
|
||||
* @param string[] $prefixes
|
||||
*/
|
||||
public function __construct(array $prefixes)
|
||||
{
|
||||
$this->count = count($prefixes);
|
||||
|
||||
if ($this->count === 0) {
|
||||
throw new InvalidArgumentException('At least one prefix is required.');
|
||||
}
|
||||
|
||||
$this->prefixes = array_map(static fn (string $prefix) => new PathPrefixer($prefix, '/'), $prefixes);
|
||||
}
|
||||
|
||||
public function publicUrl(string $path, Config $config): string
|
||||
{
|
||||
$index = abs(crc32($path)) % $this->count;
|
||||
|
||||
return $this->prefixes[$index]->prefixPath($path);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use DateTimeInterface;
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\UnableToGenerateTemporaryUrl;
|
||||
|
||||
interface TemporaryUrlGenerator
|
||||
{
|
||||
/**
|
||||
* @throws UnableToGenerateTemporaryUrl
|
||||
*/
|
||||
public function temporaryUrl(string $path, DateTimeInterface $expiresAt, Config $config): string;
|
||||
}
|
||||
Reference in New Issue
Block a user