Merge branch '0.7.x' of https://github.com/appwrite/appwrite into feat-migration-v06
This commit is contained in:
commit
383bb3d1c1
7
.env
7
.env
|
@ -3,6 +3,7 @@ _APP_ENV=development
|
|||
_APP_SYSTEM_EMAIL_NAME=Appwrite
|
||||
_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io
|
||||
_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io
|
||||
_APP_SYSTEM_RESPONSE_FORMAT=
|
||||
_APP_OPTIONS_ABUSE=disabled
|
||||
_APP_OPTIONS_FORCE_HTTPS=disabled
|
||||
_APP_OPENSSL_KEY_V1=your-secret-key
|
||||
|
@ -34,5 +35,7 @@ _APP_FUNCTIONS_CPUS=1
|
|||
_APP_FUNCTIONS_MEMORY=128
|
||||
_APP_FUNCTIONS_MEMORY_SWAP=128
|
||||
_APP_MAINTENANCE_INTERVAL=86400
|
||||
_APP_SYSTEM_RESPONSE_FORMAT=
|
||||
_APP_USAGE_STATS=enabled
|
||||
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600
|
||||
_APP_MAINTENANCE_RETENTION_ABUSE=86400
|
||||
_APP_MAINTENANCE_RETENTION_AUDIT=1209600
|
||||
_APP_USAGE_STATS=enabled
|
||||
|
|
1
.travis-ci/deploy.sh
Normal file
1
.travis-ci/deploy.sh
Normal file
|
@ -0,0 +1 @@
|
|||
echo 'Nothing to deploy right now.'
|
18
.travis.yml
18
.travis.yml
|
@ -1,9 +1,11 @@
|
|||
dist: xenial
|
||||
|
||||
arch:
|
||||
- amd64
|
||||
|
||||
os: linux
|
||||
|
||||
language: minimal
|
||||
language: shell
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
@ -20,11 +22,11 @@ before_install:
|
|||
- sudo service docker start
|
||||
- >
|
||||
if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then
|
||||
set +x
|
||||
echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin
|
||||
set -x
|
||||
echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin
|
||||
fi
|
||||
- docker --version
|
||||
- docker buildx create --use
|
||||
- chmod -R u+x ./.travis-ci
|
||||
|
||||
install:
|
||||
- docker-compose up -d
|
||||
|
@ -36,3 +38,11 @@ script:
|
|||
- docker-compose exec appwrite doctor
|
||||
- docker-compose exec appwrite vars
|
||||
- docker-compose exec appwrite test
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
edge: true
|
||||
script: ./.travis-ci/deploy.sh
|
||||
on:
|
||||
repo: appwrite/appwrite
|
||||
branch: deploy
|
||||
|
|
|
@ -72,7 +72,23 @@ cd appwrite
|
|||
docker-compose up -d
|
||||
```
|
||||
|
||||
After finishing the installation process, you can start writing and editing code. To compile new CSS and JS distribution files, use 'less' and 'build' tasks using gulp as a task manager.
|
||||
### Code Autocompletion
|
||||
|
||||
To get proper autocompletion for all the different functions and classes in the codebase, you'll need to install Appwrite dependencies on your local machine. You can easily do that with PHP's package manager, [Composer](https://getcomposer.org/). If you don't have Composer installed, you can use the Docker Hub image to get the same result:
|
||||
|
||||
```bash
|
||||
docker run --rm --interactive --tty \
|
||||
--volume $PWD:/app \
|
||||
composer install
|
||||
```
|
||||
|
||||
### User Interface
|
||||
|
||||
Appwrite uses an internal micro-framework called Litespeed.js to build simple UI components in vanilla JS and [less](http://lesscss.org/) for compiling CSS code. To apply any of your changes to the UI, use the `gulp build` or `gulp less` commands, and restart the Appwrite main container to load the new static files to memory using `docker-compose restart appwrite`.
|
||||
|
||||
### Get Started
|
||||
|
||||
After finishing the installation process, you can start writing and editing code.
|
||||
|
||||
## Architecture
|
||||
|
||||
|
@ -216,7 +232,7 @@ For us to find the right balance, please open an issue explaining your ideas bef
|
|||
|
||||
This will allow the Appwrite community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.
|
||||
|
||||
This is also important for the Appwrite lead developers to be able to give technical input and different emphasis regarding the feature design and architecture.
|
||||
This is also important for the Appwrite lead developers to be able to give technical input and different emphasis regarding the feature design and architecture. Some bigger features might need to go through our [RFC process](https://github.com/appwrite/rfc).
|
||||
|
||||
## Build
|
||||
|
||||
|
|
|
@ -100,7 +100,11 @@ ENV _APP_SERVER=swoole \
|
|||
_APP_SETUP=self-hosted \
|
||||
_APP_VERSION=$VERSION \
|
||||
_APP_USAGE_STATS=enabled \
|
||||
# 14 Days = 1209600 s
|
||||
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600 \
|
||||
_APP_MAINTENANCE_RETENTION_AUDIT=1209600 \
|
||||
# 1 Day = 86400 s
|
||||
_APP_MAINTENANCE_RETENTION_ABUSE=86400 \
|
||||
_APP_MAINTENANCE_INTERVAL=86400
|
||||
#ENV _APP_SMTP_SECURE ''
|
||||
#ENV _APP_SMTP_USERNAME ''
|
||||
|
|
185
Dockerfile.nginx
185
Dockerfile.nginx
|
@ -1,185 +0,0 @@
|
|||
FROM ubuntu:18.04 AS builder
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
ARG TESTING=false
|
||||
|
||||
ENV TZ=Asia/Tel_Aviv \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PHP_VERSION=7.4 \
|
||||
PHP_REDIS_VERSION=5.2.1
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests ca-certificates software-properties-common wget git openssl && \
|
||||
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests make php$PHP_VERSION php$PHP_VERSION-dev zip unzip php$PHP_VERSION-zip && \
|
||||
# Redis Extension
|
||||
wget -q https://github.com/phpredis/phpredis/archive/$PHP_REDIS_VERSION.tar.gz && \
|
||||
tar -xf $PHP_REDIS_VERSION.tar.gz && \
|
||||
cd phpredis-$PHP_REDIS_VERSION && \
|
||||
phpize$PHP_VERSION && \
|
||||
./configure && \
|
||||
make && \
|
||||
# Composer
|
||||
wget https://getcomposer.org/composer.phar && \
|
||||
chmod +x ./composer.phar && \
|
||||
mv ./composer.phar /usr/bin/composer && \
|
||||
#Brotli
|
||||
cd / && \
|
||||
git clone https://github.com/eustas/ngx_brotli.git && \
|
||||
cd ngx_brotli && git submodule update --init && cd ..
|
||||
|
||||
WORKDIR /usr/local/src/
|
||||
|
||||
# Updating PHP Dependencies and Auto-loading...
|
||||
|
||||
ENV TESTING=$TESTING
|
||||
|
||||
COPY composer.* /usr/local/src/
|
||||
|
||||
RUN composer update --ignore-platform-reqs --optimize-autoloader \
|
||||
--no-plugins --no-scripts --prefer-dist \
|
||||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
||||
|
||||
FROM ubuntu:18.04
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
ARG VERSION=dev
|
||||
|
||||
ENV TZ=Asia/Tel_Aviv \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PHP_VERSION=7.4 \
|
||||
_APP_SERVER=nginx \
|
||||
_APP_ENV=production \
|
||||
_APP_DOMAIN=localhost \
|
||||
_APP_DOMAIN_TARGET=localhost \
|
||||
_APP_HOME=https://appwrite.io \
|
||||
_APP_EDITION=community \
|
||||
_APP_OPTIONS_ABUSE=enabled \
|
||||
_APP_OPTIONS_FORCE_HTTPS=disabled \
|
||||
_APP_OPENSSL_KEY_V1=your-secret-key \
|
||||
_APP_STORAGE_LIMIT=10000000 \
|
||||
_APP_STORAGE_ANTIVIRUS=enabled \
|
||||
_APP_REDIS_HOST=redis \
|
||||
_APP_REDIS_PORT=6379 \
|
||||
_APP_DB_HOST=mariadb \
|
||||
_APP_DB_PORT=3306 \
|
||||
_APP_DB_USER=root \
|
||||
_APP_DB_PASS=password \
|
||||
_APP_DB_SCHEMA=appwrite \
|
||||
_APP_INFLUXDB_HOST=influxdb \
|
||||
_APP_INFLUXDB_PORT=8086 \
|
||||
_APP_STATSD_HOST=telegraf \
|
||||
_APP_STATSD_PORT=8125 \
|
||||
_APP_SMTP_HOST=smtp \
|
||||
_APP_SMTP_PORT=25 \
|
||||
_APP_SETUP=self-hosted \
|
||||
_APP_VERSION=$VERSION
|
||||
#ENV _APP_SMTP_SECURE ''
|
||||
#ENV _APP_SMTP_USERNAME ''
|
||||
#ENV _APP_SMTP_PASSWORD ''
|
||||
|
||||
COPY --from=builder /phpredis-5.2.1/modules/redis.so /usr/lib/php/20190902/
|
||||
COPY --from=builder /phpredis-5.2.1/modules/redis.so /usr/lib/php/20190902/
|
||||
COPY --from=builder /ngx_brotli /ngx_brotli
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests wget ca-certificates software-properties-common build-essential libpcre3-dev zlib1g-dev libssl-dev openssl gnupg htop supervisor && \
|
||||
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && \
|
||||
add-apt-repository universe && \
|
||||
add-apt-repository ppa:certbot/certbot && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests php$PHP_VERSION php$PHP_VERSION-fpm \
|
||||
php$PHP_VERSION-mysqlnd php$PHP_VERSION-curl php$PHP_VERSION-imagick php$PHP_VERSION-mbstring php$PHP_VERSION-dom certbot && \
|
||||
# Nginx
|
||||
wget http://nginx.org/download/nginx-1.19.0.tar.gz && \
|
||||
tar -xzvf nginx-1.19.0.tar.gz && rm nginx-1.19.0.tar.gz && \
|
||||
cd nginx-1.19.0 && \
|
||||
./configure --prefix=/usr/share/nginx \
|
||||
--sbin-path=/usr/sbin/nginx \
|
||||
--modules-path=/usr/lib/nginx/modules \
|
||||
--conf-path=/etc/nginx/nginx.conf \
|
||||
--error-log-path=/var/log/nginx/error.log \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--pid-path=/run/nginx.pid \
|
||||
--lock-path=/var/lock/nginx.lock \
|
||||
--user=www-data \
|
||||
--group=www-data \
|
||||
--build=Ubuntu \
|
||||
--with-http_gzip_static_module \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--add-module=/ngx_brotli && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -rf ../nginx-1.19.0 && \
|
||||
# Redis Extension
|
||||
echo extension=redis.so >> /etc/php/$PHP_VERSION/fpm/conf.d/redis.ini && \
|
||||
echo extension=redis.so >> /etc/php/$PHP_VERSION/cli/conf.d/redis.ini && \
|
||||
# Cleanup
|
||||
cd ../ && \
|
||||
apt-get purge -y --auto-remove wget software-properties-common build-essential libpcre3-dev zlib1g-dev libssl-dev gnupg && \
|
||||
apt-get clean && \
|
||||
rm -rf /ngx_brotli && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set Upload Limit (default to 100MB)
|
||||
RUN echo "upload_max_filesize = ${_APP_STORAGE_LIMIT}" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "post_max_size = ${_APP_STORAGE_LIMIT}" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "opcache.preload_user=www-data" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "opcache.enable_cli = 1" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
|
||||
# Add logs file
|
||||
RUN echo "" >> /var/log/appwrite.log
|
||||
|
||||
# Nginx Configuration (with self-signed ssl certificates)
|
||||
COPY ./docker/nginx.conf.template /etc/nginx/nginx.conf.template
|
||||
COPY ./docker/ssl/cert.pem /etc/nginx/ssl/cert.pem
|
||||
COPY ./docker/ssl/key.pem /etc/nginx/ssl/key.pem
|
||||
|
||||
# PHP Configuration
|
||||
RUN mkdir -p /var/run/php
|
||||
COPY ./docker/www.conf /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
|
||||
|
||||
# Add PHP Source Code
|
||||
COPY ./app /usr/src/code/app
|
||||
COPY ./bin /usr/local/bin
|
||||
COPY ./docs /usr/src/code/docs
|
||||
COPY ./public /usr/src/code/public
|
||||
COPY ./src /usr/src/code/src
|
||||
COPY --from=builder /usr/local/src/vendor /usr/src/code/vendor
|
||||
|
||||
RUN mkdir -p /storage/uploads && \
|
||||
mkdir -p /storage/cache && \
|
||||
mkdir -p /storage/config && \
|
||||
mkdir -p /storage/certificates && \
|
||||
mkdir -p /storage/functions && \
|
||||
chown -Rf www-data.www-data /storage/uploads && chmod -Rf 0755 /storage/uploads && \
|
||||
chown -Rf www-data.www-data /storage/cache && chmod -Rf 0755 /storage/cache && \
|
||||
chown -Rf www-data.www-data /storage/config && chmod -Rf 0755 /storage/config && \
|
||||
chown -Rf www-data.www-data /storage/certificates && chmod -Rf 0755 /storage/certificates && \
|
||||
chown -Rf www-data.www-data /storage/functions && chmod -Rf 0755 /storage/functions
|
||||
|
||||
# Supervisord Conf
|
||||
COPY ./docker/supervisord.conf /etc/supervisord.conf
|
||||
|
||||
# Executables
|
||||
RUN chmod +x /usr/local/bin/start
|
||||
RUN chmod +x /usr/local/bin/doctor
|
||||
RUN chmod +x /usr/local/bin/migrate
|
||||
RUN chmod +x /usr/local/bin/test
|
||||
|
||||
# Letsencrypt Permissions
|
||||
RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
WORKDIR /usr/src/code
|
||||
|
||||
CMD ["/bin/bash", "/usr/local/bin/start"]
|
|
@ -3,7 +3,7 @@
|
|||
* List of Appwrite Cloud Functions supported environments
|
||||
*/
|
||||
return [
|
||||
'node-14' => [
|
||||
'node-14.5' => [
|
||||
'name' => 'Node.js',
|
||||
'version' => '14.5',
|
||||
'base' => 'node:14.5-alpine',
|
||||
|
@ -11,6 +11,14 @@ return [
|
|||
'build' => '/usr/src/code/docker/environments/node-14.5',
|
||||
'logo' => 'node.png',
|
||||
],
|
||||
'node-15.5' => [
|
||||
'name' => 'Node.js',
|
||||
'version' => '15.5',
|
||||
'base' => 'node:15.5-alpine',
|
||||
'image' => 'appwrite/env-node-15.5:1.0.0',
|
||||
'build' => '/usr/src/code/docker/environments/node-15.5',
|
||||
'logo' => 'node.png',
|
||||
],
|
||||
'php-7.4' => [
|
||||
'name' => 'PHP',
|
||||
'version' => '7.4',
|
||||
|
@ -35,6 +43,14 @@ return [
|
|||
'build' => '/usr/src/code/docker/environments/ruby-2.7',
|
||||
'logo' => 'ruby.png',
|
||||
],
|
||||
'ruby-3.0' => [
|
||||
'name' => 'Ruby',
|
||||
'version' => '3.0',
|
||||
'base' => 'ruby:3.0-alpine',
|
||||
'image' => 'appwrite/env-ruby-3.0:1.0.0',
|
||||
'build' => '/usr/src/code/docker/environments/ruby-3.0',
|
||||
'logo' => 'ruby.png',
|
||||
],
|
||||
'python-3.8' => [
|
||||
'name' => 'Python',
|
||||
'version' => '3.8',
|
||||
|
@ -59,6 +75,14 @@ return [
|
|||
'build' => '/usr/src/code/docker/environments/deno-1.5',
|
||||
'logo' => 'deno.png',
|
||||
],
|
||||
'deno-1.6' => [
|
||||
'name' => 'Deno',
|
||||
'version' => '1.6',
|
||||
'base' => 'hayd/deno:alpine-1.6.0',
|
||||
'image' => 'appwrite/env-deno-1.6:1.0.0',
|
||||
'build' => '/usr/src/code/docker/environments/deno-1.6',
|
||||
'logo' => 'deno.png',
|
||||
],
|
||||
// 'dart-2.8' => [
|
||||
// 'name' => 'Dart',
|
||||
// 'version' => '2.8',
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use Appwrite\Auth\Auth;
|
||||
|
||||
$logged = [
|
||||
$member = [
|
||||
'public',
|
||||
'home',
|
||||
'console',
|
||||
|
@ -66,7 +66,7 @@ return [
|
|||
],
|
||||
Auth::USER_ROLE_MEMBER => [
|
||||
'label' => 'Member',
|
||||
'scopes' => \array_merge($logged, []),
|
||||
'scopes' => \array_merge($member, []),
|
||||
],
|
||||
Auth::USER_ROLE_ADMIN => [
|
||||
'label' => 'Admin',
|
||||
|
@ -78,7 +78,7 @@ return [
|
|||
],
|
||||
Auth::USER_ROLE_OWNER => [
|
||||
'label' => 'Owner',
|
||||
'scopes' => \array_merge($logged, $admins, []),
|
||||
'scopes' => \array_merge($member, $admins, []),
|
||||
],
|
||||
Auth::USER_ROLE_APP => [
|
||||
'label' => 'Application',
|
||||
|
|
|
@ -93,6 +93,14 @@ return [
|
|||
'required' => false,
|
||||
'question' => '',
|
||||
],
|
||||
[
|
||||
'name' => '_APP_SYSTEM_RESPONSE_FORMAT',
|
||||
'description' => 'Use this environment variable to set the default Appwrite HTTP response format to support an older version of Appwrite. This option is useful to overcome breaking changes between versions. You can also use the `X-Appwrite-Response-Format` HTTP request header to overwrite the response for a specific request. This variable accepts any valid Appwrite version. To use the current version format, leave the value of the variable empty.',
|
||||
'introduction' => '0.7.0',
|
||||
'default' => '',
|
||||
'required' => false,
|
||||
'question' => '',
|
||||
],
|
||||
[
|
||||
'name' => '_APP_USAGE_STATS',
|
||||
'description' => 'This variable allows you to disable the collection and displaying of usage stats. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'. When disabled, it\'s recommended to turn off the Worker Usage, Influxdb and Telegraf containers for better resource usage.',
|
||||
|
@ -356,13 +364,31 @@ return [
|
|||
'required' => false,
|
||||
'question' => '',
|
||||
],
|
||||
[
|
||||
'name' => '_APP_MAINTENANCE_RETENTION_EXECUTION',
|
||||
'description' => 'The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days).',
|
||||
'introduction' => '0.7.0',
|
||||
'default' => '1209600',
|
||||
'required' => false,
|
||||
'question' => '',
|
||||
],
|
||||
[
|
||||
'name' => '_APP_MAINTENANCE_RETENTION_AUDIT',
|
||||
'description' => 'IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days).',
|
||||
'introduction' => '0.7.0',
|
||||
'default' => '1209600',
|
||||
'required' => false,
|
||||
'question' => '',
|
||||
],
|
||||
[
|
||||
'name' => '_APP_MAINTENANCE_RETENTION_ABUSE',
|
||||
'description' => 'The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day).',
|
||||
'introduction' => '0.7.0',
|
||||
'default' => '86400',
|
||||
'required' => false,
|
||||
'question' => '',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => '_APP_SYSTEM_RESPONSE_FORMAT',
|
||||
'default' => '',
|
||||
'required' => false,
|
||||
'question' => '',
|
||||
],
|
||||
];
|
|
@ -4,11 +4,11 @@ use Appwrite\Database\Database;
|
|||
use Appwrite\Database\Document;
|
||||
use Appwrite\Database\Validator\Authorization;
|
||||
use Appwrite\Database\Validator\UID;
|
||||
use Appwrite\Storage\Storage;
|
||||
use Appwrite\Storage\Validator\File;
|
||||
use Appwrite\Storage\Validator\FileSize;
|
||||
use Appwrite\Storage\Validator\FileType;
|
||||
use Appwrite\Storage\Validator\Upload;
|
||||
use Utopia\Storage\Storage;
|
||||
use Utopia\Storage\Validator\File;
|
||||
use Utopia\Storage\Validator\FileSize;
|
||||
use Utopia\Storage\Validator\FileType;
|
||||
use Utopia\Storage\Validator\Upload;
|
||||
use Appwrite\Utopia\Response;
|
||||
use Appwrite\Task\Validator\Cron;
|
||||
use Utopia\App;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
use Utopia\App;
|
||||
use Utopia\Exception;
|
||||
use Appwrite\Storage\Device\Local;
|
||||
use Appwrite\Storage\Storage;
|
||||
use Utopia\Storage\Device\Local;
|
||||
use Utopia\Storage\Storage;
|
||||
use Appwrite\ClamAV\Network;
|
||||
use Appwrite\Event\Event;
|
||||
|
||||
|
@ -287,10 +287,6 @@ App::get('/v1/health/stats') // Currently only used internally
|
|||
|
||||
$response
|
||||
->json([
|
||||
'server' => [
|
||||
'name' => 'nginx',
|
||||
'version' => \shell_exec('nginx -v 2>&1'),
|
||||
],
|
||||
'storage' => [
|
||||
'used' => Storage::human($device->getDirectorySize($device->getRoot().'/')),
|
||||
'partitionTotal' => Storage::human($device->getPartitionTotalSpace()),
|
||||
|
|
|
@ -13,11 +13,11 @@ use Appwrite\ClamAV\Network;
|
|||
use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Document;
|
||||
use Appwrite\Database\Validator\UID;
|
||||
use Appwrite\Storage\Storage;
|
||||
use Appwrite\Storage\Validator\File;
|
||||
use Appwrite\Storage\Validator\FileSize;
|
||||
use Appwrite\Storage\Validator\Upload;
|
||||
use Appwrite\Storage\Compression\Algorithms\GZIP;
|
||||
use Utopia\Storage\Storage;
|
||||
use Utopia\Storage\Validator\File;
|
||||
use Utopia\Storage\Validator\FileSize;
|
||||
use Utopia\Storage\Validator\Upload;
|
||||
use Utopia\Storage\Compression\Algorithms\GZIP;
|
||||
use Appwrite\Resize\Resize;
|
||||
use Appwrite\OpenSSL\OpenSSL;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
|
|
@ -14,8 +14,8 @@ use Appwrite\Database\Database;
|
|||
use Appwrite\Database\Document;
|
||||
use Appwrite\Database\Validator\Authorization;
|
||||
use Appwrite\Network\Validator\Origin;
|
||||
use Appwrite\Storage\Device\Local;
|
||||
use Appwrite\Storage\Storage;
|
||||
use Utopia\Storage\Device\Local;
|
||||
use Utopia\Storage\Storage;
|
||||
use Appwrite\Utopia\Response\Filters\V06;
|
||||
use Utopia\CLI\Console;
|
||||
|
||||
|
@ -51,7 +51,11 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo
|
|||
$port = \parse_url($request->getOrigin($referrer), PHP_URL_PORT);
|
||||
|
||||
$refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.((\in_array($origin, $clients))
|
||||
? $origin : 'localhost') . (!empty($port) ? ':'.$port : '');
|
||||
? $origin : 'localhost').(!empty($port) ? ':'.$port : '');
|
||||
|
||||
$refDomain = (!$route->getLabel('origin', false)) // This route is publicly accessible
|
||||
? $refDomain
|
||||
: (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.$origin.(!empty($port) ? ':'.$port : '');
|
||||
|
||||
$selfDomain = new Domain($request->getHostname());
|
||||
$endDomain = new Domain((string)$origin);
|
||||
|
@ -79,9 +83,6 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo
|
|||
: '.'.$request->getHostname()
|
||||
);
|
||||
|
||||
Storage::setDevice('files', new Local(APP_STORAGE_UPLOADS.'/app-'.$project->getId()));
|
||||
Storage::setDevice('functions', new Local(APP_STORAGE_FUNCTIONS.'/app-'.$project->getId()));
|
||||
|
||||
/*
|
||||
* Response format
|
||||
*/
|
||||
|
@ -110,13 +111,13 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo
|
|||
}
|
||||
|
||||
$response->addHeader('Strict-Transport-Security', 'max-age='.(60 * 60 * 24 * 126)); // 126 days
|
||||
}
|
||||
}
|
||||
|
||||
$response
|
||||
->addHeader('Server', 'Appwrite')
|
||||
->addHeader('X-Content-Type-Options', 'nosniff')
|
||||
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
|
||||
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-SDK-Version, Cache-Control, Expires, Pragma')
|
||||
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-SDK-Version, Cache-Control, Expires, Pragma')
|
||||
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
|
||||
->addHeader('Access-Control-Allow-Origin', $refDomain)
|
||||
->addHeader('Access-Control-Allow-Credentials', 'true')
|
||||
|
@ -236,7 +237,7 @@ App::options(function ($request, $response) {
|
|||
$response
|
||||
->addHeader('Server', 'Appwrite')
|
||||
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
|
||||
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies')
|
||||
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies')
|
||||
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
|
||||
->addHeader('Access-Control-Allow-Origin', $origin)
|
||||
->addHeader('Access-Control-Allow-Credentials', 'true')
|
||||
|
@ -255,8 +256,11 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) {
|
|||
$template = ($route) ? $route->getLabel('error', null) : null;
|
||||
|
||||
if (php_sapi_name() === 'cli') {
|
||||
Console::error('[Error] Method: '.$route->getMethod());
|
||||
Console::error('[Error] URL: '.$route->getURL());
|
||||
if($route) {
|
||||
Console::error('[Error] Method: '.$route->getMethod());
|
||||
Console::error('[Error] URL: '.$route->getURL());
|
||||
}
|
||||
|
||||
Console::error('[Error] Type: '.get_class($error));
|
||||
Console::error('[Error] Message: '.$error->getMessage());
|
||||
Console::error('[Error] File: '.$error->getFile());
|
||||
|
|
|
@ -8,7 +8,7 @@ use Utopia\Validator\Numeric;
|
|||
use Utopia\Validator\Text;
|
||||
use Utopia\Validator\ArrayList;
|
||||
use Utopia\Validator\Host;
|
||||
use Appwrite\Storage\Validator\File;
|
||||
use Utopia\Storage\Validator\File;
|
||||
|
||||
App::get('/v1/mock/tests/foo')
|
||||
->desc('Mock a get request for SDK tests')
|
||||
|
|
|
@ -6,8 +6,8 @@ use Utopia\App;
|
|||
use Utopia\Exception;
|
||||
use Utopia\Abuse\Abuse;
|
||||
use Utopia\Abuse\Adapters\TimeLimit;
|
||||
use Appwrite\Storage\Device\Local;
|
||||
use Appwrite\Storage\Storage;
|
||||
use Utopia\Storage\Device\Local;
|
||||
use Utopia\Storage\Storage;
|
||||
|
||||
App::init(function ($utopia, $request, $response, $project, $user, $register, $events, $audits, $usage, $deletes) {
|
||||
/** @var Utopia\App $utopia */
|
||||
|
|
|
@ -7,7 +7,7 @@ use Utopia\Domains\Domain;
|
|||
use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Validator\Authorization;
|
||||
use Appwrite\Database\Validator\UID;
|
||||
use Appwrite\Storage\Storage;
|
||||
use Utopia\Storage\Storage;
|
||||
|
||||
App::init(function ($layout) {
|
||||
/** @var Utopia\View $layout */
|
||||
|
|
|
@ -191,7 +191,7 @@ App::get('/error/:code')
|
|||
$layout
|
||||
->setParam('title', 'Error'.' - '.APP_NAME)
|
||||
->setParam('body', $page);
|
||||
}, ['']);
|
||||
});
|
||||
|
||||
App::get('/specs/:format')
|
||||
->groups(['web', 'home'])
|
||||
|
|
|
@ -20,7 +20,7 @@ ini_set('display_errors', 1);
|
|||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$http = new Server("0.0.0.0", 80);
|
||||
$http = new Server("0.0.0.0", App::getEnv('PORT', 80));
|
||||
|
||||
$payloadSize = max(4000000 /* 4mb */, App::getEnv('_APP_STORAGE_LIMIT', 10000000 /* 10mb */));
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
global $cli;
|
||||
|
||||
use Appwrite\ClamAV\Network;
|
||||
use Appwrite\Storage\Device\Local;
|
||||
use Appwrite\Storage\Storage;
|
||||
use Utopia\Storage\Device\Local;
|
||||
use Utopia\Storage\Storage;
|
||||
use Utopia\App;
|
||||
use Utopia\CLI\Console;
|
||||
use Utopia\Domains\Domain;
|
||||
|
|
|
@ -4,28 +4,19 @@ global $cli;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Adapter\MySQL as MySQLAdapter;
|
||||
use Appwrite\Database\Adapter\Redis as RedisAdapter;
|
||||
use Appwrite\Event\Event;
|
||||
use Utopia\App;
|
||||
use Utopia\CLI\Console;
|
||||
use Utopia\Config\Config;
|
||||
|
||||
// TODO: Think of a better way to access consoleDB
|
||||
function getConsoleDB() {
|
||||
global $register;
|
||||
$consoleDB = new Database();
|
||||
$consoleDB->setAdapter(new RedisAdapter(new MySQLAdapter($register), $register));
|
||||
$consoleDB->setNamespace('app_console'); // Main DB
|
||||
$consoleDB->setMocks(Config::getParam('collections', []));
|
||||
return $consoleDB;
|
||||
}
|
||||
Console::title('Maintenance V1');
|
||||
|
||||
function notifyDeleteExecutionLogs()
|
||||
Console::success(APP_NAME.' maintenance process v1 has started');
|
||||
|
||||
function notifyDeleteExecutionLogs(int $interval)
|
||||
{
|
||||
Resque::enqueue(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME, [
|
||||
'type' => DELETE_TYPE_EXECUTIONS
|
||||
'type' => DELETE_TYPE_EXECUTIONS,
|
||||
'timestamp' => time() - $interval
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -51,17 +42,15 @@ $cli
|
|||
->action(function () {
|
||||
// # of days in seconds (1 day = 86400s)
|
||||
$interval = (int) App::getEnv('_APP_MAINTENANCE_INTERVAL', '86400');
|
||||
//Convert Seconds to microseconds
|
||||
$intervalMicroseconds = $interval * 1000000;
|
||||
|
||||
$consoleDB = getConsoleDB();
|
||||
|
||||
Console::loop(function() use ($consoleDB, $interval){
|
||||
Console::info("[ MAINTENANCE TASK ] Notifying deletes workers every {$interval} seconds");
|
||||
notifyDeleteExecutionLogs();
|
||||
notifyDeleteAbuseLogs($interval);
|
||||
notifyDeleteAuditLogs($interval);
|
||||
|
||||
}, $intervalMicroseconds);
|
||||
$executionLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_EXECUTION', '1209600');
|
||||
$auditLogRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', '1209600');
|
||||
$abuseLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_ABUSE', '86400');
|
||||
|
||||
Console::loop(function() use ($interval, $executionLogsRetention, $abuseLogsRetention, $auditLogRetention){
|
||||
$time = date('d-m-Y H:i:s', time());
|
||||
Console::info("[{$time}] Notifying deletes workers every {$interval} seconds");
|
||||
notifyDeleteExecutionLogs($executionLogsRetention);
|
||||
notifyDeleteAbuseLogs($abuseLogsRetention);
|
||||
notifyDeleteAuditLogs($auditLogRetention);
|
||||
}, $interval);
|
||||
});
|
|
@ -29,6 +29,8 @@
|
|||
<div class="box margin-bottom-xl">
|
||||
<div>
|
||||
<form name="account.update"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Account Name"
|
||||
|
@ -58,6 +60,8 @@
|
|||
<hr />
|
||||
|
||||
<form name="update-email"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Account Email"
|
||||
|
@ -99,6 +103,8 @@
|
|||
<h1>Update Password</h1>
|
||||
|
||||
<form name="update-password"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Account Password"
|
||||
|
@ -129,6 +135,8 @@
|
|||
<hr />
|
||||
|
||||
<form class="margin-top"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Account Current Session"
|
||||
|
@ -163,6 +171,8 @@
|
|||
<p>PLEASE NOTE: Account deletion is irreversible.</p>
|
||||
|
||||
<form class="inline"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Account"
|
||||
|
@ -197,6 +207,8 @@
|
|||
<span data-ls-if="true != {{session.current}}">
|
||||
<!-- From remote session (-logout event) -->
|
||||
<form class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Account Session"
|
||||
|
@ -218,6 +230,8 @@
|
|||
<span data-ls-if="true == {{session.current}}">
|
||||
<!-- From current session (+logout event) -->
|
||||
<form class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Account Current Session"
|
||||
|
@ -254,6 +268,8 @@
|
|||
</div>
|
||||
|
||||
<form class="inline margin-bottom-large"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Account Sessions"
|
||||
|
|
|
@ -6,6 +6,7 @@ $version = $this->getParam('version', '').'.'.APP_CACHE_BUSTER;
|
|||
<ul class="copyright pull-start">
|
||||
<li>
|
||||
<a class="link-animation-enabled"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/footer"
|
||||
data-analytics-label="GitHub Link"
|
||||
|
@ -13,6 +14,7 @@ $version = $this->getParam('version', '').'.'.APP_CACHE_BUSTER;
|
|||
</li>
|
||||
<li>
|
||||
<a class="link-animation-enabled"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/footer"
|
||||
data-analytics-label="New GitHub Issue"
|
||||
|
@ -20,6 +22,7 @@ $version = $this->getParam('version', '').'.'.APP_CACHE_BUSTER;
|
|||
</li>
|
||||
<li>
|
||||
<a class="link-animation-enabled"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/footer"
|
||||
data-analytics-label="Docs Link"
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<span class="link"><i class="icon-sun-inv force-dark pull-start"></i><i class="icon-moon-inv force-light pull-start"></i> Change Theme
|
||||
<div class="pull-end switch-theme">
|
||||
<button data-general-theme
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/header"
|
||||
data-analytics-label="Switch Theme">
|
||||
|
@ -67,6 +68,7 @@
|
|||
|
||||
<nav class="project-only" data-ls-ui-open="" data-button-class="round icon-btn phones-only tablets-only" data-button-aria="Navigation" data-button-icon="icon-dot-3">
|
||||
<a class="logo" href="/console"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Logo Link">
|
||||
|
@ -81,6 +83,7 @@
|
|||
<ul class="links">
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/home?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Home Link">
|
||||
|
@ -95,6 +98,7 @@
|
|||
<ul class="links">
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/database?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Database Link">
|
||||
|
@ -104,6 +108,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/storage?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Storage Link">
|
||||
|
@ -113,6 +118,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/users?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Users Link">
|
||||
|
@ -122,6 +128,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/functions?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Functions Link"
|
||||
|
@ -137,6 +144,7 @@
|
|||
<ul class="links">
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/tasks?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Tasks Link">
|
||||
|
@ -146,6 +154,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/webhooks?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Webhooks Links">
|
||||
|
@ -155,6 +164,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/keys?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="API Keys Link">
|
||||
|
@ -168,6 +178,7 @@
|
|||
<ul class="links bottom">
|
||||
<li>
|
||||
<a data-ls-attrs="href=/console/settings?project={{router.params.project}}"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Settings Link">
|
||||
|
@ -194,6 +205,8 @@
|
|||
|
||||
<form
|
||||
data-setup
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project">
|
||||
|
|
|
@ -174,6 +174,8 @@ $maxCells = 10;
|
|||
<div class="row responsive margin-top-negative">
|
||||
<div class="col span-8 margin-bottom">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Database Collection"
|
||||
|
@ -340,6 +342,8 @@ $maxCells = 10;
|
|||
</ul>
|
||||
|
||||
<form name="database.deleteCollection" class="margin-bottom"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Database Collection"
|
||||
|
@ -363,6 +367,7 @@ $maxCells = 10;
|
|||
<ul data-ls-loop="project-collection.rules" data-ls-as="rule" class="sortable">
|
||||
<li data-forms-remove data-forms-move-up data-forms-move-down>
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-event="splice-rule-{{$index}}"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Spliced Collection Rule"
|
||||
|
@ -384,6 +389,8 @@ $maxCells = 10;
|
|||
<h1>Add Rule</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Added Collection Rule"
|
||||
|
|
|
@ -192,6 +192,8 @@ $collections = [];
|
|||
<div class="row responsive margin-top-negative">
|
||||
<div class="col span-8 margin-bottom">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Database Document"
|
||||
|
@ -288,6 +290,8 @@ $collections = [];
|
|||
|
||||
<div data-ls-if="({{project-document.$id}})">
|
||||
<form name="database.deleteDocument" class="margin-bottom"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Collection Document"
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
<h1>New Collection</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Database Collection"
|
||||
|
|
|
@ -52,6 +52,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
</p>
|
||||
|
||||
<form data-ls-if="{{project-function.tag}} !== ''" name="functions.createExecution" class="margin-top"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Function Execution"
|
||||
|
@ -94,6 +96,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<ul data-ls-loop="project-function-tags.tags" data-ls-as="tag" class="list">
|
||||
<li class="clear">
|
||||
<form data-ls-if="{{tag.$id}} !== {{project-function.tag}}" name="functions.updateTag" class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Function Execution"
|
||||
|
@ -116,6 +120,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<span class="pull-start" data-ls-bind="Created {{tag.dateCreated|timeSince}} | {{tag.size|humanFileSize}}"></span>
|
||||
|
||||
<form data-ls-if="{{tag.$id}} !== {{project-function.tag}}" name="functions.deleteTag" class="pull-start"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Function Tag"
|
||||
|
@ -147,6 +153,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<h1>Deploy a New Tag</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Function Tag"
|
||||
|
@ -221,6 +229,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
</ul>
|
||||
|
||||
<form name="functions.delete" class="margin-bottom"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Function"
|
||||
|
@ -469,6 +479,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<label> </label>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Function"
|
||||
|
@ -525,7 +537,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<hr class="margin-bottom margin-top-no" />
|
||||
|
||||
<fieldset name="vars" data-cast-to="object">
|
||||
<div data-ls-loop="project-function.vars" data-ls-as="var" id="project-vars">
|
||||
<div data-ls-loop="project-function.vars" data-ls-as="var" id="project-vars" style="visibility: visible;">
|
||||
<div class="margin-bottom-small">
|
||||
<div data-forms-remove class="row thin">
|
||||
<div class="col span-10">
|
||||
|
@ -571,6 +583,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
</ul>
|
||||
|
||||
<form name="functions.delete" class="margin-bottom"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Function"
|
||||
|
|
|
@ -90,6 +90,8 @@ $environments = $this->getParam('environments', []);
|
|||
<h1>Add Function</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Function"
|
||||
|
|
|
@ -30,6 +30,10 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<div class="pull-end">
|
||||
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '24h'"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Usage 24h"
|
||||
data-service="projects.getUsage"
|
||||
data-event="submit"
|
||||
data-name="usage"
|
||||
|
@ -41,6 +45,10 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '24h'" disabled>24h</button>
|
||||
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '30d'"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Usage 30d"
|
||||
data-service="projects.getUsage"
|
||||
data-event="submit"
|
||||
data-name="usage"
|
||||
|
@ -51,6 +59,10 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '30d'" disabled>30d</button>
|
||||
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '90d'"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Usage 90d"
|
||||
data-service="projects.getUsage"
|
||||
data-event="submit"
|
||||
data-name="usage"
|
||||
|
@ -140,6 +152,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
</div>
|
||||
|
||||
<form class="pull-end margin-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Project Platform"
|
||||
|
@ -191,7 +205,11 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
</div>
|
||||
|
||||
<div class="pull-end desktops-only tablets-only">
|
||||
<a data-ls-attrs="href=/console/keys?project={{router.params.project}}">Manage Your Server API Keys</a>
|
||||
<a data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="API Keys Link"
|
||||
data-ls-attrs="href=/console/keys?project={{router.params.project}}">Manage Your Server API Keys</a>
|
||||
</div>
|
||||
|
||||
<div class="drop-list pull-start" data-ls-ui-open="" data-button-aria="Choose Platform" data-button-text="Add Platform" data-button-class="button" data-blur="1">
|
||||
|
@ -221,6 +239,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<h1>New Web App</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Platform (Web)"
|
||||
|
@ -259,6 +279,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
|
||||
<script type="text/html" id="template-web-update">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project Platform (Web)"
|
||||
|
@ -297,6 +319,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<h2 style="display: none"> iOS </h2>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Platform (Flutter / iOS)"
|
||||
|
@ -329,6 +353,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<h2 style="display: none"> Android </h2>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Platform (Flutter / Android)"
|
||||
|
@ -361,9 +387,11 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
|
||||
<script type="text/html" id="template-ios-update">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project Platform (iOS)"
|
||||
data-analytics-label="Update Project Platform (Flutter / iOS)"
|
||||
data-service="projects.updatePlatform"
|
||||
data-scope="console"
|
||||
data-event="submit"
|
||||
|
@ -391,9 +419,10 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
|
||||
<script type="text/html" id="template-android-update">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project Platform (Android)"
|
||||
data-analytics-label="Update Project Platform (Flutter / Android)"
|
||||
data-service="projects.updatePlatform"
|
||||
data-scope="console"
|
||||
data-event="submit"
|
||||
|
|
|
@ -93,23 +93,28 @@ $home = $this->getParam('home', '');
|
|||
<p class="text-fade">Join Appwrite growing developers community channels.</p>
|
||||
|
||||
<a href="<?php echo APP_SOCIAL_TWITTER; ?>" target="_blank" rel="noopener" title="<?php echo APP_NAME;?> on Twitter"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/home"
|
||||
data-analytics-label="Twitter Link"><i class="icon-twitter"></i></a>
|
||||
<a href="<?php echo APP_SOCIAL_FACEBOOK; ?>" target="_blank" rel="noopener" title="<?php echo APP_NAME;?> on Facebook"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/home"
|
||||
data-analytics-label="Facebook Link"><i class="icon-facebook"></i></a>
|
||||
<a href="<?php echo APP_SOCIAL_LINKEDIN; ?>" target="_blank" rel="noopener" title="<?php echo APP_NAME;?> on Linkedin"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/home"
|
||||
data-analytics-label="Linkedin Link"><i class="icon-linkedin"></i></a>
|
||||
<a href="<?php echo APP_SOCIAL_DISCORD; ?>" target="_blank" rel="noopener" title="<?php echo APP_NAME;?> Discord Server"
|
||||
data-analytics
|
||||
data-analytics-event="click"
|
||||
data-analytics-category="console/home"
|
||||
data-analytics-label="Discord Link"><i class="icon-discord"></i></a>
|
||||
<a href="<?php echo APP_SOCIAL_GITHUB; ?>" target="_blank" rel="noopener" title="<?php echo APP_NAME;?> on Github"
|
||||
data-analytics-event="click"
|
||||
data-analytics
|
||||
data-analytics-type="click"
|
||||
data-analytics-category="console/home"
|
||||
data-analytics-label="GitHub Link"><i class="icon-github-circled"></i></a>
|
||||
</div>
|
||||
|
|
|
@ -33,6 +33,8 @@ $scopes = $this->getParam('scopes', []);
|
|||
<h1>Update API Key</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project Key"
|
||||
|
@ -75,6 +77,8 @@ $scopes = $this->getParam('scopes', []);
|
|||
</div>
|
||||
|
||||
<form class="pull-end margin-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Project Key"
|
||||
|
@ -131,9 +135,11 @@ $scopes = $this->getParam('scopes', []);
|
|||
<h1>Add API Keys</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Platform"
|
||||
data-analytics-label="Create Project Key"
|
||||
data-service="projects.createKey"
|
||||
data-scope="console"
|
||||
data-event="submit"
|
||||
|
|
|
@ -33,6 +33,8 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
|
||||
<div class="box margin-bottom-large">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project"
|
||||
|
@ -87,6 +89,8 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
<p>PLEASE NOTE: Project deletion is irreversible.</p>
|
||||
|
||||
<form class="inline"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Project"
|
||||
|
@ -281,6 +285,8 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
<li>
|
||||
Confirm and verify your CNAME record values:
|
||||
<form class="strip"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Domain Verification"
|
||||
|
@ -313,6 +319,8 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
</td>
|
||||
<td data-title="">
|
||||
<form class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Project Domain"
|
||||
|
@ -345,6 +353,8 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
<h1>Add Domain</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Domain"
|
||||
|
@ -388,9 +398,11 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
<ul data-ls-loop="members.memberships" data-ls-as="member" class="list">
|
||||
<li class="clear">
|
||||
<form class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Team Membership"
|
||||
data-analytics-label="Delete Project Membership"
|
||||
data-service="teams.deleteMembership"
|
||||
data-scope="console"
|
||||
data-event="submit"
|
||||
|
@ -409,9 +421,11 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
|
||||
<div data-ls-if="false === {{member.confirm}}" class="pull-end margin-end">
|
||||
<form class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Team Membership (resend)"
|
||||
data-analytics-label="Create Project Membership (resend)"
|
||||
data-service="teams.deleteMembership"
|
||||
data-scope="console"
|
||||
data-event="submit"
|
||||
|
@ -462,9 +476,11 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
|
|||
<h1>Invite Member</h1>
|
||||
|
||||
<form name="teams.createTeamMembership"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Team Membership"
|
||||
data-analytics-label="Create Project Membership"
|
||||
data-service="teams.createMembership"
|
||||
data-scope="console"
|
||||
data-event="submit"
|
||||
|
|
|
@ -23,6 +23,8 @@ $fileLimitHuman = $this->getParam('fileLimitHuman', 0);
|
|||
<h1>Upload File</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Storage File"
|
||||
|
@ -124,6 +126,8 @@ $fileLimitHuman = $this->getParam('fileLimitHuman', 0);
|
|||
<div class="row responsive modalize">
|
||||
<div class="col span-8">
|
||||
<form class="strip"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Storage File"
|
||||
|
@ -153,6 +157,8 @@ $fileLimitHuman = $this->getParam('fileLimitHuman', 0);
|
|||
</form>
|
||||
|
||||
<form class="strip"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete File"
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
|
||||
<br />
|
||||
|
||||
<span data-ls-if="undefined !== {{task.previous}}">
|
||||
<span data-ls-if="undefined !== {{task.previous}} && {{task.previous}}">
|
||||
<span data-ls-bind="Prev: {{task.previous|dateTime}}"></span>
|
||||
|
||||
<!-- <span data-ls-if="undefined !== {{task.delay}} && 59 < {{task.delay}}" class="text-danger margin-top-tiny">
|
||||
|
@ -78,6 +78,8 @@
|
|||
<h1>Update Task</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project Task"
|
||||
|
@ -202,6 +204,8 @@
|
|||
</div>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Project Task"
|
||||
|
@ -238,6 +242,8 @@
|
|||
<h1>Add Task</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Task"
|
||||
|
|
|
@ -23,6 +23,8 @@ $providers = $this->getParam('providers', []);
|
|||
<h1>Create User</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create User"
|
||||
|
@ -176,6 +178,8 @@ $providers = $this->getParam('providers', []);
|
|||
<h1>Create Team</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Team"
|
||||
|
@ -319,6 +323,8 @@ $providers = $this->getParam('providers', []);
|
|||
<h1><?php echo $this->escape($name); ?> OAuth2 Settings</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project OAuth2"
|
||||
|
@ -339,7 +345,7 @@ $providers = $this->getParam('providers', []);
|
|||
<input name="appId" id="oauth2<?php echo $this->escape(ucfirst($provider)); ?>Appid" type="text" autocomplete="off" data-ls-bind="{{console-project.usersOauth2<?php echo $this->escape(ucfirst($provider)); ?>Appid}}">
|
||||
|
||||
<label for="oauth2<?php echo $this->escape(ucfirst($provider)); ?>Secret">App Secret</label>
|
||||
<input name="secret" data-forms-show-secret data-forms-show-secret-above="true" id="oauth2<?php echo $this->escape(ucfirst($provider)); ?>Secret" type="password" autocomplete="off" data-ls-bind="{{console-project.usersOauth2<?php echo $this->escape(ucfirst($provider)); ?>Secret}}">
|
||||
<input name="secret" data-forms-show-secret id="oauth2<?php echo $this->escape(ucfirst($provider)); ?>Secret" type="password" autocomplete="off" data-ls-bind="{{console-project.usersOauth2<?php echo $this->escape(ucfirst($provider)); ?>Secret}}">
|
||||
<?php else: ?>
|
||||
<label for="oauth2<?php echo $this->escape(ucfirst($provider)); ?>Appid">Bundle ID <span class="tooltip" data-tooltip="Attribute internal display name"><i class="icon-info-circled"></i></span></label>
|
||||
<input name="appId" id="oauth2<?php echo $this->escape(ucfirst($provider)); ?>Appid" type="text" autocomplete="off" data-ls-bind="{{console-project.usersOauth2<?php echo $this->escape(ucfirst($provider)); ?>Appid}}" placeholder="com.company.appname" />
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
<div class="box margin-bottom-large">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Team"
|
||||
|
@ -88,6 +90,8 @@
|
|||
<ul data-ls-loop="project-members.memberships" data-ls-as="member" class="list">
|
||||
<li class="clear">
|
||||
<form class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Team Membership"
|
||||
|
@ -125,6 +129,8 @@
|
|||
<h1>Add Member</h1>
|
||||
|
||||
<form name="teams.createTeamMembership"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Team Membership"
|
||||
|
@ -204,6 +210,8 @@
|
|||
</ul>
|
||||
|
||||
<form name="teams.delete" class="margin-bottom"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Team"
|
||||
|
|
|
@ -104,6 +104,8 @@
|
|||
<p>PLEASE NOTE: User deletion is irreversible.</p>
|
||||
|
||||
<form class="inline"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete User"
|
||||
|
@ -136,6 +138,8 @@
|
|||
|
||||
<div data-ls-if="{{user.status}} !== <?php echo \Appwrite\Auth\Auth::USER_STATUS_BLOCKED; ?>" style="display: none">
|
||||
<form name="users.updateStatus" class="margin-bottom"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update User Status"
|
||||
|
@ -149,12 +153,14 @@
|
|||
data-failure-param-alert-text="Failed to block user"
|
||||
data-failure-param-alert-classname="error">
|
||||
|
||||
<button name="status" type="submit" class="danger fill" value="<?php echo \Appwrite\Auth\Auth::USER_STATUS_BLOCKED; ?>">Block Account</button>
|
||||
<button name="status" type="submit" class="danger fill" value="<?php echo \Appwrite\Auth\Auth::USER_STATUS_BLOCKED; ?>" data-cast-to="integer">Block Account</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div data-ls-if="{{user.status}} === <?php echo \Appwrite\Auth\Auth::USER_STATUS_BLOCKED; ?>" style="display: none">
|
||||
<form name="users.updateStatus" class="margin-bottom"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update User Status"
|
||||
|
@ -168,7 +174,7 @@
|
|||
data-failure-param-alert-text="Failed to activate user"
|
||||
data-failure-param-alert-classname="error">
|
||||
|
||||
<button name="status" type="submit" class="fill" value="<?php echo \Appwrite\Auth\Auth::USER_STATUS_ACTIVATED; ?>">Activate Account</button>
|
||||
<button name="status" type="submit" class="fill" value="<?php echo \Appwrite\Auth\Auth::USER_STATUS_ACTIVATED; ?>" data-cast-to="integer">Activate Account</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -192,6 +198,8 @@
|
|||
<ul data-ls-loop="sessions.sessions" data-ls-as="session" class="list">
|
||||
<li class="clear">
|
||||
<form class="pull-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete User Session"
|
||||
|
@ -222,6 +230,8 @@
|
|||
</div>
|
||||
|
||||
<form class="inline margin-bottom-large"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete User Sessions"
|
||||
|
|
|
@ -37,6 +37,8 @@ $events = array_keys($this->getParam('events', []));
|
|||
<h1>Update Webhook</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Project Webhook"
|
||||
|
@ -116,6 +118,8 @@ $events = array_keys($this->getParam('events', []));
|
|||
</div>
|
||||
|
||||
<form class="pull-end margin-end"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Delete Project Webhook"
|
||||
|
@ -154,6 +158,8 @@ $events = array_keys($this->getParam('events', []));
|
|||
<h1>Add Webhook</h1>
|
||||
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Create Project Webhook"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<section class="zone medium">
|
||||
<form class="box margin-top-large"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="home"
|
||||
data-analytics-label="Update Team Membership Status"
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<small class="pull-end text-size-small">* All fields are required</small>
|
||||
|
||||
<form name="account.createRecovery"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="home"
|
||||
data-analytics-label="Create Account Recovery"
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<br />
|
||||
|
||||
<form name="recovery-reset"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="home"
|
||||
data-analytics-label="Update Account Recovery"
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
<p>Login using email and password</p>
|
||||
|
||||
<form name="account.createSession"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="home"
|
||||
data-analytics-label="Create Account Session"
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
<small class="pull-end text-size-small">* All fields are required</small>
|
||||
|
||||
<form name="account.create"
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="home"
|
||||
data-analytics-label="Create Account"
|
||||
|
|
|
@ -279,11 +279,10 @@ services:
|
|||
- _APP_REDIS_HOST
|
||||
- _APP_REDIS_PORT
|
||||
- _APP_MAINTENANCE_INTERVAL
|
||||
- _APP_DB_HOST
|
||||
- _APP_DB_PORT
|
||||
- _APP_DB_SCHEMA
|
||||
- _APP_DB_USER
|
||||
- _APP_DB_PASS
|
||||
- _APP_MAINTENANCE_RETENTION_EXECUTION
|
||||
- _APP_MAINTENANCE_RETENTION_ABUSE
|
||||
- _APP_MAINTENANCE_RETENTION_AUDIT
|
||||
|
||||
|
||||
appwrite-schedule:
|
||||
image: appwrite/appwrite:<?php echo $version."\n"; ?>
|
||||
|
|
|
@ -6,7 +6,7 @@ use Utopia\CLI\Console;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Audits V1 Worker');
|
||||
Console::title('Audits V1 Worker');
|
||||
|
||||
Console::success(APP_NAME.' audits worker v1 has started');
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use Appwrite\Network\Validator\CNAME;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Certificates V1 Worker');
|
||||
Console::title('Certificates V1 Worker');
|
||||
|
||||
Console::success(APP_NAME.' certificates worker v1 has started');
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ use Appwrite\Database\Adapter\MySQL as MySQLAdapter;
|
|||
use Appwrite\Database\Adapter\Redis as RedisAdapter;
|
||||
use Appwrite\Database\Document;
|
||||
use Appwrite\Database\Validator\Authorization;
|
||||
use Appwrite\Storage\Device\Local;
|
||||
use Utopia\Storage\Device\Local;
|
||||
use Utopia\Abuse\Abuse;
|
||||
use Utopia\Abuse\Adapters\TimeLimit;
|
||||
use Utopia\CLI\Console;
|
||||
|
@ -15,7 +15,7 @@ use Utopia\Audit\Adapters\MySQL as AuditAdapter;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Deletes V1 Worker');
|
||||
Console::title('Deletes V1 Worker');
|
||||
|
||||
Console::success(APP_NAME.' deletes worker v1 has started'."\n");
|
||||
|
||||
|
@ -59,7 +59,7 @@ class DeletesV1
|
|||
break;
|
||||
|
||||
case DELETE_TYPE_EXECUTIONS:
|
||||
$this->deleteExecutionLogs();
|
||||
$this->deleteExecutionLogs($this->args['timestamp']);
|
||||
break;
|
||||
|
||||
case DELETE_TYPE_AUDIT:
|
||||
|
@ -121,16 +121,17 @@ class DeletesV1
|
|||
], $this->getProjectDB($projectId));
|
||||
}
|
||||
|
||||
protected function deleteExecutionLogs()
|
||||
protected function deleteExecutionLogs($timestamp)
|
||||
{
|
||||
$this->deleteForProjectIds(function($projectId) {
|
||||
$this->deleteForProjectIds(function($projectId) use ($timestamp) {
|
||||
if (!($projectDB = $this->getProjectDB($projectId))) {
|
||||
throw new Exception('Failed to get projectDB for project '.$projectId);
|
||||
}
|
||||
|
||||
// Delete Executions
|
||||
$this->deleteByGroup([
|
||||
'$collection='.Database::SYSTEM_COLLECTION_EXECUTIONS
|
||||
'$collection='.Database::SYSTEM_COLLECTION_EXECUTIONS,
|
||||
'dateCreated<'.$timestamp
|
||||
], $projectDB);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
<?php
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Document;
|
||||
|
@ -16,7 +13,7 @@ use Utopia\Config\Config;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Functions V1 Worker');
|
||||
Console::title('Functions V1 Worker');
|
||||
|
||||
Runtime::setHookFlags(SWOOLE_HOOK_ALL);
|
||||
|
||||
|
@ -37,14 +34,9 @@ Co\run(function() use ($environments) { // Warmup: make sure images are ready t
|
|||
$stdout = '';
|
||||
$stderr = '';
|
||||
|
||||
Console::info('Warming up '.$environment['name'].' environment...');
|
||||
Console::info('Warming up '.$environment['name'].' '.$environment['version'].' environment...');
|
||||
|
||||
if(App::isDevelopment()) {
|
||||
Console::execute('docker build '.$environment['build'].' -t '.$environment['image'], '', $stdout, $stderr);
|
||||
}
|
||||
else {
|
||||
Console::execute('docker pull '.$environment['image'], '', $stdout, $stderr);
|
||||
}
|
||||
Console::execute('docker pull '.$environment['image'], '', $stdout, $stderr);
|
||||
|
||||
if(!empty($stdout)) {
|
||||
Console::log($stdout);
|
||||
|
@ -116,19 +108,6 @@ $stdout = \explode("\n", $stdout);
|
|||
|
||||
Console::info(count($list)." functions listed in " . ($executionEnd - $executionStart) . " seconds with exit code {$exitCode}");
|
||||
|
||||
/*
|
||||
* 1. Get Original Task
|
||||
* 2. Check for updates
|
||||
* If has updates skip task and don't reschedule
|
||||
* If status not equal to play skip task
|
||||
* 3. Check next run date, update task and add new job at the given date
|
||||
* 4. Execute task (set optional timeout)
|
||||
* 5. Update task response to log
|
||||
* On success reset error count
|
||||
* On failure add error count
|
||||
* If error count bigger than allowed change status to pause
|
||||
*/
|
||||
|
||||
/**
|
||||
* 1. Get event args - DONE
|
||||
* 2. Unpackage code in the isolated container - DONE
|
||||
|
@ -144,23 +123,6 @@ Console::info(count($list)." functions listed in " . ($executionEnd - $execution
|
|||
|
||||
//TODO aviod scheduled execution if delay is bigger than X offest
|
||||
|
||||
/**
|
||||
* Limit CPU Usage - DONE
|
||||
* Limit Memory Usage - DONE
|
||||
* Limit Network Usage
|
||||
* Limit Storage Usage (//--storage-opt size=120m \)
|
||||
* Make sure no access to redis, mariadb, influxdb or other system services
|
||||
* Make sure no access to NFS server / storage volumes
|
||||
* Access Appwrite REST from internal network for improved performance
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get Usage Stats
|
||||
* -> Network (docker stats --no-stream --format="{{.NetIO}}" appwrite)
|
||||
* -> CPU Time - DONE
|
||||
* -> Invoctions (+1) - DONE
|
||||
*/
|
||||
|
||||
class FunctionsV1
|
||||
{
|
||||
public $args = [];
|
||||
|
@ -380,6 +342,15 @@ class FunctionsV1
|
|||
unset($list[$container]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit CPU Usage - DONE
|
||||
* Limit Memory Usage - DONE
|
||||
* Limit Network Usage
|
||||
* Limit Storage Usage (//--storage-opt size=120m \)
|
||||
* Make sure no access to redis, mariadb, influxdb or other system services
|
||||
* Make sure no access to NFS server / storage volumes
|
||||
* Access Appwrite REST from internal network for improved performance
|
||||
*/
|
||||
if(!isset($list[$container])) { // Create contianer if not ready
|
||||
$stdout = '';
|
||||
$stderr = '';
|
||||
|
|
|
@ -5,7 +5,7 @@ use Utopia\CLI\Console;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Mails V1 Worker');
|
||||
Console::title('Mails V1 Worker');
|
||||
|
||||
Console::success(APP_NAME.' mails worker v1 has started'."\n");
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use Cron\CronExpression;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Tasks V1 Worker');
|
||||
Console::title('Tasks V1 Worker');
|
||||
|
||||
Console::success(APP_NAME.' tasks worker v1 has started');
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ use Utopia\CLI\Console;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Usage V1 Worker');
|
||||
Console::title('Usage V1 Worker');
|
||||
|
||||
Console::success(APP_NAME.' usage worker v1 has started');
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Appwrite\Database\Validator\Authorization;
|
|||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
\cli_set_process_title('Webhooks V1 Worker');
|
||||
Console::title('Webhooks V1 Worker');
|
||||
|
||||
Console::success(APP_NAME.' webhooks worker v1 has started');
|
||||
|
||||
|
|
37
bin/start
37
bin/start
|
@ -1,37 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export PHP_VERSION=$PHP_VERSION
|
||||
|
||||
chown -Rf www-data.www-data /usr/src/code/
|
||||
|
||||
sed 's/%_APP_STORAGE_LIMIT%/'$_APP_STORAGE_LIMIT'/g' /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
||||
|
||||
# Function to update the fpm configuration to make the service environment variables available
|
||||
function setEnvironmentVariable() {
|
||||
if [ -z "$2" ]; then
|
||||
echo "Environment variable '$1' not set."
|
||||
return
|
||||
fi
|
||||
|
||||
# Check whether variable already exists
|
||||
if ! grep -q "\[$1\]" /etc/php/$PHP_VERSION/fpm/pool.d/www.conf; then
|
||||
# Add variable
|
||||
echo "env[$1] = $2" >> /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
|
||||
fi
|
||||
|
||||
# Reset variable
|
||||
# sed -i "s/^env\[$1.*/env[$1] = $2/g" /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
|
||||
}
|
||||
|
||||
# Grep for variables that look like MySQL (APP_)
|
||||
for _curVar in $(env | grep _APP_ | awk -F = '{print $1}');do
|
||||
# awk has split them by the equals sign
|
||||
# Pass the name and value to our function
|
||||
setEnvironmentVariable ${_curVar} ${!_curVar}
|
||||
done
|
||||
|
||||
# Init server settings
|
||||
php /usr/src/code/app/tasks/init.php ssl
|
||||
|
||||
# Start supervisord and services
|
||||
/usr/bin/supervisord -n -c /etc/supervisord.conf
|
|
@ -38,13 +38,14 @@
|
|||
"utopia-php/abuse": "0.3.*",
|
||||
"utopia-php/audit": "0.5.*",
|
||||
"utopia-php/cache": "0.2.*",
|
||||
"utopia-php/cli": "0.8.0",
|
||||
"utopia-php/cli": "0.9.0",
|
||||
"utopia-php/config": "0.2.*",
|
||||
"utopia-php/locale": "0.3.*",
|
||||
"utopia-php/registry": "0.2.*",
|
||||
"utopia-php/preloader": "0.2.*",
|
||||
"utopia-php/domains": "0.2.*",
|
||||
"utopia-php/swoole": "0.2.*",
|
||||
"utopia-php/storage": "0.1.*",
|
||||
|
||||
"resque/php-resque": "1.3.6",
|
||||
"matomo/device-detector": "3.13.0",
|
||||
|
|
246
composer.lock
generated
246
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "2a235acbc30e22872101713bf3602351",
|
||||
"content-hash": "3c94b5ea6b60232905b6831bec020b69",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
@ -1333,20 +1333,20 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/cli",
|
||||
"version": "0.8",
|
||||
"version": "0.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/cli.git",
|
||||
"reference": "090c7ae22b53a175d962e8f9601d36350496153c"
|
||||
"reference": "a83f8b5f57022e0d1c50913f1b1ab4f8f087dceb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/cli/zipball/090c7ae22b53a175d962e8f9601d36350496153c",
|
||||
"reference": "090c7ae22b53a175d962e8f9601d36350496153c",
|
||||
"url": "https://api.github.com/repos/utopia-php/cli/zipball/a83f8b5f57022e0d1c50913f1b1ab4f8f087dceb",
|
||||
"reference": "a83f8b5f57022e0d1c50913f1b1ab4f8f087dceb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"php": ">=7.4",
|
||||
"utopia-php/framework": "0.*.*"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -1380,9 +1380,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/cli/issues",
|
||||
"source": "https://github.com/utopia-php/cli/tree/0.8"
|
||||
"source": "https://github.com/utopia-php/cli/tree/0.9.0"
|
||||
},
|
||||
"time": "2020-12-14T06:31:42+00:00"
|
||||
"time": "2021-01-19T20:00:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/config",
|
||||
|
@ -1695,6 +1695,58 @@
|
|||
},
|
||||
"time": "2020-10-24T08:51:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/storage",
|
||||
"version": "0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/storage.git",
|
||||
"reference": "00e9045cee6bd1ec1d1f27329c329494ef420c19"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/storage/zipball/00e9045cee6bd1ec1d1f27329c329494ef420c19",
|
||||
"reference": "00e9045cee6bd1ec1d1f27329c329494ef420c19",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.4",
|
||||
"utopia-php/framework": "0.10.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.3",
|
||||
"vimeo/psalm": "4.0.1"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Utopia\\Storage\\": "src/Storage"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Eldad Fux",
|
||||
"email": "eldad@appwrite.io"
|
||||
}
|
||||
],
|
||||
"description": "A simple Storage library to manage application storage",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"php",
|
||||
"storage",
|
||||
"upf",
|
||||
"utopia"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/storage/issues",
|
||||
"source": "https://github.com/utopia-php/storage/tree/0.1.0"
|
||||
},
|
||||
"time": "2021-01-22T07:27:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/swoole",
|
||||
"version": "0.2.0",
|
||||
|
@ -3082,12 +3134,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "cbe315f4d3b653ac0310862697866ffddabc502f"
|
||||
"reference": "0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cbe315f4d3b653ac0310862697866ffddabc502f",
|
||||
"reference": "cbe315f4d3b653ac0310862697866ffddabc502f",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2",
|
||||
"reference": "0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3151,7 +3203,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-02T06:24:37+00:00"
|
||||
"time": "2021-01-21T05:59:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
|
@ -3159,12 +3211,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "0837b6d36db129e8e9478d39f2f2cd9e40eaef97"
|
||||
"reference": "d66b11be20460c55f9655b50d06c0070d6de0ab8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/0837b6d36db129e8e9478d39f2f2cd9e40eaef97",
|
||||
"reference": "0837b6d36db129e8e9478d39f2f2cd9e40eaef97",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/d66b11be20460c55f9655b50d06c0070d6de0ab8",
|
||||
"reference": "d66b11be20460c55f9655b50d06c0070d6de0ab8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3212,7 +3264,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:06:22+00:00"
|
||||
"time": "2021-01-23T09:14:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-invoker",
|
||||
|
@ -3220,12 +3272,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-invoker.git",
|
||||
"reference": "cc5d70ab3d26c07ca2c5a7edaa4df1b64ffce737"
|
||||
"reference": "24d9117c920e229e4dd4e65ed966951dc8d6c0ee"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/cc5d70ab3d26c07ca2c5a7edaa4df1b64ffce737",
|
||||
"reference": "cc5d70ab3d26c07ca2c5a7edaa4df1b64ffce737",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/24d9117c920e229e4dd4e65ed966951dc8d6c0ee",
|
||||
"reference": "24d9117c920e229e4dd4e65ed966951dc8d6c0ee",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3276,7 +3328,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:06:31+00:00"
|
||||
"time": "2021-01-23T09:14:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
|
@ -3284,12 +3336,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
||||
"reference": "4bf8e2b779618907e744fd8c221a669d481ae522"
|
||||
"reference": "3ace7e098d9ae64fdf2ee12e69ec1ed3eb16d6ec"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/4bf8e2b779618907e744fd8c221a669d481ae522",
|
||||
"reference": "4bf8e2b779618907e744fd8c221a669d481ae522",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3ace7e098d9ae64fdf2ee12e69ec1ed3eb16d6ec",
|
||||
"reference": "3ace7e098d9ae64fdf2ee12e69ec1ed3eb16d6ec",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3336,7 +3388,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:07:09+00:00"
|
||||
"time": "2021-01-23T09:15:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
|
@ -3344,12 +3396,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "5b6fb138e2bba0d33bc043ccfc58caa585a1b666"
|
||||
"reference": "7fe4501c193086a375125ff31e7b8bb6122f00bd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5b6fb138e2bba0d33bc043ccfc58caa585a1b666",
|
||||
"reference": "5b6fb138e2bba0d33bc043ccfc58caa585a1b666",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/7fe4501c193086a375125ff31e7b8bb6122f00bd",
|
||||
"reference": "7fe4501c193086a375125ff31e7b8bb6122f00bd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3396,7 +3448,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:06:40+00:00"
|
||||
"time": "2021-01-23T09:14:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
|
@ -3561,12 +3613,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/cli-parser.git",
|
||||
"reference": "b9d0154b00cd0c232d2fb04c7a41aef04a3ef388"
|
||||
"reference": "72cbe9a5d3ac979d81dbe177c8bd6d103699c502"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/b9d0154b00cd0c232d2fb04c7a41aef04a3ef388",
|
||||
"reference": "b9d0154b00cd0c232d2fb04c7a41aef04a3ef388",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/72cbe9a5d3ac979d81dbe177c8bd6d103699c502",
|
||||
"reference": "72cbe9a5d3ac979d81dbe177c8bd6d103699c502",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3610,7 +3662,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:07:37+00:00"
|
||||
"time": "2021-01-23T09:15:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit",
|
||||
|
@ -3674,12 +3726,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
|
||||
"reference": "e9fb7de0109de478aa512d6001b95c9111259cb4"
|
||||
"reference": "e49b92c16b780c4d526c118d49d904c4626b8c63"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/e9fb7de0109de478aa512d6001b95c9111259cb4",
|
||||
"reference": "e9fb7de0109de478aa512d6001b95c9111259cb4",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/e49b92c16b780c4d526c118d49d904c4626b8c63",
|
||||
"reference": "e49b92c16b780c4d526c118d49d904c4626b8c63",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3722,7 +3774,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:05:02+00:00"
|
||||
"time": "2021-01-23T09:13:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
|
@ -3730,12 +3782,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "1803ef9c6631bec96ba12adb392d9bdd80bffccc"
|
||||
"reference": "33c94310f57ca21d5ea6018c4e799be699e85650"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1803ef9c6631bec96ba12adb392d9bdd80bffccc",
|
||||
"reference": "1803ef9c6631bec96ba12adb392d9bdd80bffccc",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/33c94310f57ca21d5ea6018c4e799be699e85650",
|
||||
"reference": "33c94310f57ca21d5ea6018c4e799be699e85650",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3797,7 +3849,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:05:14+00:00"
|
||||
"time": "2021-01-23T09:13:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/complexity",
|
||||
|
@ -3805,12 +3857,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/complexity.git",
|
||||
"reference": "c2deec80b7a2df9556d77cb98e238a8a4780ca32"
|
||||
"reference": "b251b4b76965b9a24a847ac5641ed7419723e7e3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c2deec80b7a2df9556d77cb98e238a8a4780ca32",
|
||||
"reference": "c2deec80b7a2df9556d77cb98e238a8a4780ca32",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/b251b4b76965b9a24a847ac5641ed7419723e7e3",
|
||||
"reference": "b251b4b76965b9a24a847ac5641ed7419723e7e3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3855,7 +3907,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:07:18+00:00"
|
||||
"time": "2021-01-23T09:15:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
|
@ -3863,12 +3915,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "3768e4448231a9ed88b8b82d14e3c86c60bc24e0"
|
||||
"reference": "1c3726f5fc6ecdf41a7d7a992c18db936d79345e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3768e4448231a9ed88b8b82d14e3c86c60bc24e0",
|
||||
"reference": "3768e4448231a9ed88b8b82d14e3c86c60bc24e0",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1c3726f5fc6ecdf41a7d7a992c18db936d79345e",
|
||||
"reference": "1c3726f5fc6ecdf41a7d7a992c18db936d79345e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3922,7 +3974,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:05:23+00:00"
|
||||
"time": "2021-01-23T09:13:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
|
@ -3930,12 +3982,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "23c7b3502969bd25c425f74484a99763e48bdeec"
|
||||
"reference": "71408304f2a06879d9306d6126ff19c26b77ab8f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/23c7b3502969bd25c425f74484a99763e48bdeec",
|
||||
"reference": "23c7b3502969bd25c425f74484a99763e48bdeec",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/71408304f2a06879d9306d6126ff19c26b77ab8f",
|
||||
"reference": "71408304f2a06879d9306d6126ff19c26b77ab8f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3986,7 +4038,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:05:33+00:00"
|
||||
"time": "2021-01-23T09:13:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
|
@ -3994,12 +4046,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "3e0ddb2289e17efc39cf03cb6a93286d3ac37de9"
|
||||
"reference": "9fdb8e271acb70c94fc378d0cd32de380e1a6f9d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3e0ddb2289e17efc39cf03cb6a93286d3ac37de9",
|
||||
"reference": "3e0ddb2289e17efc39cf03cb6a93286d3ac37de9",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/9fdb8e271acb70c94fc378d0cd32de380e1a6f9d",
|
||||
"reference": "9fdb8e271acb70c94fc378d0cd32de380e1a6f9d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4064,7 +4116,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:05:42+00:00"
|
||||
"time": "2021-01-23T09:13:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
|
@ -4072,12 +4124,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "d172b1d21828f3034f064b02b584b6c86399baa1"
|
||||
"reference": "483fae6c9f89aee344c35547df17b130827a0981"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/d172b1d21828f3034f064b02b584b6c86399baa1",
|
||||
"reference": "d172b1d21828f3034f064b02b584b6c86399baa1",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/483fae6c9f89aee344c35547df17b130827a0981",
|
||||
"reference": "483fae6c9f89aee344c35547df17b130827a0981",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4129,7 +4181,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:05:52+00:00"
|
||||
"time": "2021-01-23T09:14:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/lines-of-code",
|
||||
|
@ -4137,12 +4189,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
|
||||
"reference": "ec5577068ba8a8f56fcfe66239bfbae6c2af6819"
|
||||
"reference": "815e6e5f9021de94a4f896835e9a7b0fd9557e2d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/ec5577068ba8a8f56fcfe66239bfbae6c2af6819",
|
||||
"reference": "ec5577068ba8a8f56fcfe66239bfbae6c2af6819",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/815e6e5f9021de94a4f896835e9a7b0fd9557e2d",
|
||||
"reference": "815e6e5f9021de94a4f896835e9a7b0fd9557e2d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4187,7 +4239,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:07:28+00:00"
|
||||
"time": "2021-01-23T09:15:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/object-enumerator",
|
||||
|
@ -4195,12 +4247,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
|
||||
"reference": "9d9fa9141b9dbc5141a930d30c932634ea714bf2"
|
||||
"reference": "5f8c843a728ed5433bbd6f4426923f9d750be40b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/9d9fa9141b9dbc5141a930d30c932634ea714bf2",
|
||||
"reference": "9d9fa9141b9dbc5141a930d30c932634ea714bf2",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5f8c843a728ed5433bbd6f4426923f9d750be40b",
|
||||
"reference": "5f8c843a728ed5433bbd6f4426923f9d750be40b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4245,7 +4297,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:06:01+00:00"
|
||||
"time": "2021-01-23T09:14:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/object-reflector",
|
||||
|
@ -4253,12 +4305,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/object-reflector.git",
|
||||
"reference": "3c2c8cdd6e598e61fe9182663bc5c65152570af0"
|
||||
"reference": "d41ef59df68d6f470c8084fae471b56fd2812bb2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/3c2c8cdd6e598e61fe9182663bc5c65152570af0",
|
||||
"reference": "3c2c8cdd6e598e61fe9182663bc5c65152570af0",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d41ef59df68d6f470c8084fae471b56fd2812bb2",
|
||||
"reference": "d41ef59df68d6f470c8084fae471b56fd2812bb2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4301,7 +4353,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:06:12+00:00"
|
||||
"time": "2021-01-23T09:14:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
|
@ -4309,12 +4361,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
||||
"reference": "f56f4b45cf5b284977639e9c13bcabb8e10e0d95"
|
||||
"reference": "f78f35f8c348f59a47e7973ec0533ae7be54254d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f56f4b45cf5b284977639e9c13bcabb8e10e0d95",
|
||||
"reference": "f56f4b45cf5b284977639e9c13bcabb8e10e0d95",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f78f35f8c348f59a47e7973ec0533ae7be54254d",
|
||||
"reference": "f78f35f8c348f59a47e7973ec0533ae7be54254d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4365,7 +4417,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:06:50+00:00"
|
||||
"time": "2021-01-23T09:14:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/resource-operations",
|
||||
|
@ -4429,12 +4481,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/type.git",
|
||||
"reference": "d9383363efecc03b461b82922410e470ee4d13d8"
|
||||
"reference": "55fa25ad7fc6fb7caf2f7cfada5e5e20adf731aa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/d9383363efecc03b461b82922410e470ee4d13d8",
|
||||
"reference": "d9383363efecc03b461b82922410e470ee4d13d8",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/55fa25ad7fc6fb7caf2f7cfada5e5e20adf731aa",
|
||||
"reference": "55fa25ad7fc6fb7caf2f7cfada5e5e20adf731aa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4478,7 +4530,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T08:06:59+00:00"
|
||||
"time": "2021-01-23T09:14:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
|
@ -4578,12 +4630,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "356c70659d6b48595f9f275cd7c4de0d5544c49c"
|
||||
"reference": "5d9e349571fa1fed2ed89fe1f5ffd58331468e87"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/356c70659d6b48595f9f275cd7c4de0d5544c49c",
|
||||
"reference": "356c70659d6b48595f9f275cd7c4de0d5544c49c",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/5d9e349571fa1fed2ed89fe1f5ffd58331468e87",
|
||||
"reference": "5d9e349571fa1fed2ed89fe1f5ffd58331468e87",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4668,7 +4720,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-14T15:43:35+00:00"
|
||||
"time": "2021-01-23T09:52:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
|
@ -5563,20 +5615,20 @@
|
|||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.9.1",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
|
||||
"url": "https://github.com/webmozarts/assert.git",
|
||||
"reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
|
||||
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
|
||||
"url": "https://api.github.com/repos/webmozarts/assert/zipball/9c89b265ccc4092d58e66d72af5d343ee77a41ae",
|
||||
"reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3 || ^7.0 || ^8.0",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"conflict": {
|
||||
|
@ -5584,9 +5636,15 @@
|
|||
"vimeo/psalm": "<3.9.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
||||
"phpunit/phpunit": "^8.5.13"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.10-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Webmozart\\Assert\\": "src/"
|
||||
|
@ -5609,10 +5667,10 @@
|
|||
"validate"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/webmozart/assert/issues",
|
||||
"source": "https://github.com/webmozart/assert/tree/master"
|
||||
"issues": "https://github.com/webmozarts/assert/issues",
|
||||
"source": "https://github.com/webmozarts/assert/tree/master"
|
||||
},
|
||||
"time": "2020-07-08T17:02:28+00:00"
|
||||
"time": "2021-01-18T12:52:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/path-util",
|
||||
|
|
|
@ -1,215 +0,0 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.2
|
||||
container_name: appwrite-traefik
|
||||
command:
|
||||
- --log.level=DEBUG
|
||||
- --api.insecure=true
|
||||
- --providers.file.directory=/storage/config
|
||||
- --providers.file.watch=true
|
||||
- --providers.docker=true
|
||||
- --entrypoints.web.address=:80
|
||||
- --entrypoints.websecure.address=:443
|
||||
- --accesslog=true
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- appwrite-config:/storage/config:ro
|
||||
- appwrite-certificates:/storage/certificates:ro
|
||||
depends_on:
|
||||
- appwrite
|
||||
networks:
|
||||
- gateway
|
||||
- appwrite
|
||||
|
||||
appwrite:
|
||||
container_name: appwrite
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- TESTING=true
|
||||
- VERSION=dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
labels:
|
||||
- traefik.http.routers.appwrite.rule=PathPrefix(`/`)
|
||||
- traefik.http.routers.appwrite-secure.rule=PathPrefix(`/`)
|
||||
- traefik.http.routers.appwrite-secure.tls=true
|
||||
volumes:
|
||||
- appwrite-uploads:/storage/uploads:rw
|
||||
- appwrite-cache:/storage/cache:rw
|
||||
- appwrite-config:/storage/config:rw
|
||||
- appwrite-certificates:/storage/certificates:rw
|
||||
- appwrite-functions:/storage/functions:rw
|
||||
- ./phpunit.xml:/usr/src/code/phpunit.xml
|
||||
- ./tests:/usr/src/code/tests
|
||||
- ./app:/usr/src/code/app
|
||||
# - ./vendor:/usr/src/code/vendor
|
||||
- ./docs:/usr/src/code/docs
|
||||
- ./public:/usr/src/code/public
|
||||
- ./src:/usr/src/code/src
|
||||
ports:
|
||||
- 9501:80
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis
|
||||
# - smtp
|
||||
- clamav
|
||||
- influxdb
|
||||
- telegraf
|
||||
- maildev
|
||||
environment:
|
||||
#- _APP_ENV=production
|
||||
- _APP_ENV=development
|
||||
- _APP_OPTIONS_ABUSE=disabled
|
||||
- _APP_OPTIONS_FORCE_HTTPS=disabled
|
||||
- _APP_OPENSSL_KEY_V1=your-secret-key
|
||||
- _APP_DOMAIN=demo.appwrite.io
|
||||
- _APP_DOMAIN_TARGET=demo.appwrite.io
|
||||
- _APP_REDIS_HOST=redis
|
||||
- _APP_REDIS_PORT=6379
|
||||
- _APP_DB_HOST=mariadb
|
||||
- _APP_DB_PORT=3306
|
||||
- _APP_DB_SCHEMA=appwrite
|
||||
- _APP_DB_USER=user
|
||||
- _APP_DB_PASS=password
|
||||
- _APP_INFLUXDB_HOST=influxdb
|
||||
- _APP_INFLUXDB_PORT=8086
|
||||
- _APP_STATSD_HOST=telegraf
|
||||
- _APP_STATSD_PORT=8125
|
||||
- _APP_SMTP_HOST=maildev
|
||||
- _APP_SMTP_PORT=25
|
||||
|
||||
mariadb:
|
||||
image: appwrite/mariadb:1.2.0 # fix issues when upgrading using: mysql_upgrade -u root -p
|
||||
container_name: appwrite-mariadb
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-mariadb:/var/lib/mysql:rw
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=rootsecretpassword
|
||||
- MYSQL_DATABASE=appwrite
|
||||
- MYSQL_USER=user
|
||||
- MYSQL_PASSWORD=password
|
||||
command: 'mysqld --innodb-flush-method=fsync'
|
||||
|
||||
maildev:
|
||||
image: djfarrelly/maildev
|
||||
container_name: appwrite-maildev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '1080:80'
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
# smtp:
|
||||
# image: appwrite/smtp:1.0.1
|
||||
# container_name: appwrite-smtp
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# environment:
|
||||
# - MAILNAME=appwrite
|
||||
# - RELAY_NETWORKS=:192.168.0.0/24:10.0.0.0/16
|
||||
|
||||
redis:
|
||||
image: redis:5.0
|
||||
container_name: appwrite-redis
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-redis:/data:rw
|
||||
|
||||
clamav:
|
||||
image: appwrite/clamav:1.2.0
|
||||
container_name: appwrite-clamav
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-uploads:/storage/uploads
|
||||
|
||||
influxdb:
|
||||
image: influxdb:1.6
|
||||
container_name: appwrite-influxdb
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-influxdb:/var/lib/influxdb:rw
|
||||
|
||||
telegraf:
|
||||
image: appwrite/telegraf:1.0.0
|
||||
container_name: appwrite-telegraf
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
# redis-commander:
|
||||
# image: rediscommander/redis-commander:latest
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# environment:
|
||||
# - REDIS_HOSTS=redis
|
||||
# ports:
|
||||
# - "8081:8081"
|
||||
|
||||
# resque:
|
||||
# image: registry.gitlab.com/appwrite/appwrite/resque-web:v1.0.2
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# ports:
|
||||
# - "5678:5678"
|
||||
# environment:
|
||||
# - RESQUE_WEB_HOST=redis
|
||||
# - RESQUE_WEB_PORT=6379
|
||||
# - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user
|
||||
# - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password
|
||||
|
||||
# chronograf:
|
||||
# image: chronograf:1.5
|
||||
# container_name: appwrite-chronograf
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# volumes:
|
||||
# - appwrite-chronograf:/var/lib/chronograf
|
||||
# ports:
|
||||
# - "8888:8888"
|
||||
# environment:
|
||||
# - INFLUXDB_URL=http://influxdb:8086
|
||||
# - KAPACITOR_URL=http://kapacitor:9092
|
||||
# - AUTH_DURATION=48h
|
||||
# - TOKEN_SECRET=duperduper5674829!jwt
|
||||
# - GH_CLIENT_ID=d86f7145a41eacfc52cc
|
||||
# - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab
|
||||
# - GH_ORGS=appwrite
|
||||
|
||||
networks:
|
||||
gateway:
|
||||
appwrite:
|
||||
|
||||
volumes:
|
||||
appwrite-mariadb:
|
||||
appwrite-redis:
|
||||
appwrite-cache:
|
||||
appwrite-uploads:
|
||||
appwrite-certificates:
|
||||
appwrite-functions:
|
||||
appwrite-influxdb:
|
||||
appwrite-chronograf:
|
||||
appwrite-config:
|
|
@ -21,7 +21,6 @@ services:
|
|||
- --entrypoints.web.address=:80
|
||||
- --entrypoints.websecure.address=:443
|
||||
- --accesslog=true
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
|
@ -43,7 +42,6 @@ services:
|
|||
args:
|
||||
- TESTING=true
|
||||
- VERSION=dev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 9501:80
|
||||
networks:
|
||||
|
@ -80,6 +78,7 @@ services:
|
|||
- _APP_SYSTEM_EMAIL_NAME
|
||||
- _APP_SYSTEM_EMAIL_ADDRESS
|
||||
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
|
||||
- _APP_SYSTEM_RESPONSE_FORMAT
|
||||
- _APP_OPTIONS_ABUSE
|
||||
- _APP_OPTIONS_FORCE_HTTPS
|
||||
- _APP_OPENSSL_KEY_V1
|
||||
|
@ -106,7 +105,6 @@ services:
|
|||
- _APP_STORAGE_LIMIT
|
||||
- _APP_FUNCTIONS_TIMEOUT
|
||||
- _APP_FUNCTIONS_CONTAINERS
|
||||
- _APP_SYSTEM_RESPONSE_FORMAT
|
||||
- _APP_FUNCTIONS_CPUS
|
||||
- _APP_FUNCTIONS_MEMORY
|
||||
- _APP_FUNCTIONS_MEMORY_SWAP
|
||||
|
@ -116,7 +114,6 @@ services:
|
|||
container_name: appwrite-worker-usage
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -137,7 +134,6 @@ services:
|
|||
container_name: appwrite-worker-audits
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -161,7 +157,6 @@ services:
|
|||
container_name: appwrite-worker-webhooks
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -187,7 +182,6 @@ services:
|
|||
container_name: appwrite-worker-tasks
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -212,7 +206,6 @@ services:
|
|||
container_name: appwrite-worker-deletes
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -239,7 +232,6 @@ services:
|
|||
container_name: appwrite-worker-certificates
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -266,7 +258,6 @@ services:
|
|||
container_name: appwrite-worker-functions
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -274,8 +265,8 @@ services:
|
|||
- appwrite-functions:/storage/functions:rw
|
||||
- /tmp:/tmp:rw
|
||||
- ./app:/usr/src/code/app
|
||||
- ./docker:/usr/src/code/docker
|
||||
- ./src:/usr/src/code/src
|
||||
- ./docker:/usr/src/code/docker
|
||||
depends_on:
|
||||
- redis
|
||||
- mariadb
|
||||
|
@ -300,7 +291,6 @@ services:
|
|||
container_name: appwrite-worker-mails
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -327,9 +317,11 @@ services:
|
|||
container_name: appwrite-maintenance
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- ./app:/usr/src/code/app
|
||||
- ./src:/usr/src/code/src
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
|
@ -337,18 +329,15 @@ services:
|
|||
- _APP_REDIS_HOST
|
||||
- _APP_REDIS_PORT
|
||||
- _APP_MAINTENANCE_INTERVAL
|
||||
- _APP_DB_HOST
|
||||
- _APP_DB_PORT
|
||||
- _APP_DB_SCHEMA
|
||||
- _APP_DB_USER
|
||||
- _APP_DB_PASS
|
||||
- _APP_MAINTENANCE_RETENTION_EXECUTION
|
||||
- _APP_MAINTENANCE_RETENTION_ABUSE
|
||||
- _APP_MAINTENANCE_RETENTION_AUDIT
|
||||
|
||||
appwrite-schedule:
|
||||
entrypoint: schedule
|
||||
container_name: appwrite-schedule
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -364,13 +353,12 @@ services:
|
|||
mariadb:
|
||||
image: appwrite/mariadb:1.2.0 # fix issues when upgrading using: mysql_upgrade -u root -p
|
||||
container_name: appwrite-mariadb
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-mariadb:/var/lib/mysql:rw
|
||||
ports:
|
||||
- "9502:3306"
|
||||
- "3306:3306"
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=password
|
||||
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
|
||||
|
@ -394,7 +382,6 @@ services:
|
|||
redis:
|
||||
image: redis:6.0-alpine
|
||||
container_name: appwrite-redis
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -403,7 +390,6 @@ services:
|
|||
clamav:
|
||||
image: appwrite/clamav:1.2.0
|
||||
container_name: appwrite-clamav
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -412,7 +398,6 @@ services:
|
|||
influxdb:
|
||||
image: influxdb:1.8-alpine
|
||||
container_name: appwrite-influxdb
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
|
@ -421,14 +406,25 @@ services:
|
|||
telegraf:
|
||||
image: appwrite/telegraf:1.0.0
|
||||
container_name: appwrite-telegraf
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
# Dev Tools Start ------------------------------------------------------------------------------------------
|
||||
#
|
||||
# The Appwrite Team uses the following tools to help debug, monitor and diagnose the Appwrite stack
|
||||
#
|
||||
# Here is a description of the different tools and why are we using them:
|
||||
#
|
||||
# MailCatcher - An SMTP server. Catches all system emails and displays them in a nice UI.
|
||||
# RequestCatcher - An HTTP server. Catches all system https calls and displays them using a simple HTTP API. Used to debug & tests webhooks and HTTP tasks
|
||||
# RedisCommander - A nice UI for exploring Redis data
|
||||
# Resque - A nice UI for exploring Reddis pub/sub, view the different queues workloads, pending and failed tasks
|
||||
# Chronograf - A nice UI for exploring InfluxDB data
|
||||
# Webgrind - A nice UI for exploring and debugging code-level stuff
|
||||
|
||||
maildev: # used mainly for dev tests
|
||||
image: djfarrelly/maildev
|
||||
container_name: appwrite-maildev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '9503:80'
|
||||
networks:
|
||||
|
@ -437,12 +433,19 @@ services:
|
|||
request-catcher: # used mainly for dev tests
|
||||
image: smarterdm/http-request-catcher
|
||||
container_name: appwrite-request-catcher
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '9504:5000'
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
restart: always
|
||||
ports:
|
||||
- 9505:8080
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
# redis-commander:
|
||||
# image: rediscommander/redis-commander:latest
|
||||
# restart: unless-stopped
|
||||
|
@ -491,6 +494,8 @@ services:
|
|||
# - './debug:/tmp'
|
||||
# ports:
|
||||
# - '3001:80'
|
||||
|
||||
# Dev Tools End ------------------------------------------------------------------------------------------
|
||||
|
||||
networks:
|
||||
gateway:
|
||||
|
|
|
@ -6,9 +6,15 @@ docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
|||
echo 'Deno 1.5...'
|
||||
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-deno-1.5:1.0.0 ./docker/environments/deno-1.5/ --push
|
||||
|
||||
echo 'Deno 1.6...'
|
||||
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-deno-1.6:1.0.0 ./docker/environments/deno-1.6/ --push
|
||||
|
||||
echo 'Node 14.5...'
|
||||
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-14.5:1.0.0 ./docker/environments/node-14.5/ --push
|
||||
|
||||
echo 'Node 15.5...'
|
||||
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-15.5:1.0.0 ./docker/environments/node-15.5/ --push
|
||||
|
||||
echo 'PHP 7.4...'
|
||||
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-php-7.4:1.0.0 ./docker/environments/php-7.4/ --push
|
||||
|
||||
|
@ -20,3 +26,6 @@ docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
|||
|
||||
echo 'Ruby 2.7...'
|
||||
docker buildx build --platform linux/amd64,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-ruby-2.7:1.0.2 ./docker/environments/ruby-2.7/ --push
|
||||
|
||||
echo 'Ruby 3.0...'
|
||||
docker buildx build --platform linux/amd64,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-ruby-3.0:1.0.0 ./docker/environments/ruby-3.0/ --push
|
||||
|
|
11
docker/environments/deno-1.6/Dockerfile
Normal file
11
docker/environments/deno-1.6/Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
FROM hayd/deno:alpine-1.6.2
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
RUN apk add tar
|
||||
|
||||
RUN mkdir /usr/local/src
|
||||
|
||||
WORKDIR /usr/local/src/
|
||||
|
||||
ENV DENO_DIR=/usr/local/src/.appwrite
|
9
docker/environments/node-15.5/Dockerfile
Normal file
9
docker/environments/node-15.5/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM node:15.5-alpine
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
RUN apk add tar
|
||||
|
||||
RUN mkdir /usr/local/src
|
||||
|
||||
WORKDIR /usr/local/src/
|
12
docker/environments/ruby-3.0/Dockerfile
Normal file
12
docker/environments/ruby-3.0/Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM ruby:3.0-alpine
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
RUN apk add tar
|
||||
|
||||
RUN mkdir /usr/local/src
|
||||
|
||||
WORKDIR /usr/local/src/
|
||||
|
||||
ENV GEM_PATH=/usr/local/src/.appwrite
|
||||
ENV GEM_SPEC_CACHE=/usr/local/src/.appwrite/specs
|
|
@ -1,149 +0,0 @@
|
|||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
worker_connections 2048;
|
||||
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
# Basic Settings
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
client_max_body_size %_APP_STORAGE_LIMIT%;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# SSL Settings
|
||||
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
#ssl_prefer_server_ciphers on;
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 DES-CBC3-SHA +SHA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !EXP !PSK !SRP !CAMELLIA !SEED';
|
||||
ssl_prefer_server_ciphers off;
|
||||
|
||||
# Logging Settings
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
# Gzip Settings
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||
|
||||
# Brotli Settings
|
||||
brotli on;
|
||||
brotli_comp_level 5;
|
||||
brotli_static on;
|
||||
brotli_types application/atom+xml application/javascript application/json application/rss+xml
|
||||
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
|
||||
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
|
||||
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
|
||||
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
|
||||
|
||||
# Virtual Host Configs
|
||||
server {
|
||||
listen 80; ## listen for ipv4; this line is default and implied
|
||||
listen [::]:80 ipv6only=on; ## listen for ipv6
|
||||
listen 443 default ssl http2;
|
||||
|
||||
#ssl on;
|
||||
ssl_certificate /etc/nginx/ssl/cert.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/key.pem;
|
||||
|
||||
root /usr/src/code/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
# Make site accessible from http://localhost/
|
||||
#server_name localhost;
|
||||
|
||||
# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
|
||||
sendfile off;
|
||||
|
||||
# Add stdout logging
|
||||
|
||||
#error_log /dev/stdout info;
|
||||
#access_log /dev/stdout;
|
||||
|
||||
access_log off;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to index.html
|
||||
try_files $uri $uri/ /index.php?q=$uri&$args;
|
||||
|
||||
}
|
||||
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:ico|cur|gz|svg|svgz|mp4|ogg|woff|woff2|ogv|webm|htc)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# CSS and JavaScript
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location /images {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location /favicon.png {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/src/code;
|
||||
}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
#fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;
|
||||
fastcgi_param HTTP_IF_MODIFIED_SINCE $http_if_modified_since;
|
||||
fastcgi_read_timeout 600;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
# deny access to . files, for security
|
||||
location ~ /\.(?!well-known).* {
|
||||
#log_not_found off;
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEpDCCAowCCQDLt1wOwov7hTANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAls
|
||||
b2NhbGhvc3QwHhcNMTkxMTA5MTgyNDA3WhcNMjAxMTA4MTgyNDA3WjAUMRIwEAYD
|
||||
VQQDDAlsb2NhbGhvc3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCp
|
||||
nPP8ck7HKPVorhtIZfxY8Mf+rnhIhenRMzDTmGtq53dhbg4I1kGcy8WZkyh6QaxQ
|
||||
PyrNKZXBAQtELSWGgjL3PnVsKWVtQT2YzBSIhHTXct6RbYpd2yLmK77IOmu0DtWF
|
||||
0QX5TxEB/ryDn92uGxIlKptDxqLrsbN1GhZYkXn0jVp6jIqC32YnxJVItzhSqCns
|
||||
eJrF96XeXZKlN5TmSbpAwbjyZCkCCWi8q5CLpjrhFdud754pmuiJ03xQn9LXhvIx
|
||||
OzQ8jPiINr+cR19sZHiAwOdb028gjL8VYdvAiOiJ85UwPwPBeCpJkS4FVWxDpBhQ
|
||||
XjUGbr5YiACcUNenoEjbSut80VhyAqHVPtEY4WMFclua6vuszGQW4cyhWLKO2pN2
|
||||
lno0EakXDZT9P53OKB1gFDvpyK3LmD6B4OvddIBCbSYgAotkcojOlcHVDYJUVcN6
|
||||
VgiJQann/QLQXcgu8K0CUY4hVvtHV7RlfMc1QcOote5lpUWDpByYWw8TAUHa7MGX
|
||||
VjNu4q//w3SVRW1RyxVjtgOznLvAM+kFZFV3epS9A9zyk0XyxDuqjz8oLQwKhzms
|
||||
/ORaDa7WPlqyJ9mkwRWgs+zthFp5fcMJ4onwXqR9Yem4UMsugBEFFn/3kto2ZsAg
|
||||
DZjrVnlWOpee645S3GRtNjpu0LFqIfYeuZmowDgYQQIDAQABMA0GCSqGSIb3DQEB
|
||||
CwUAA4ICAQAbSqv901fqZn2CiSVHP7hZkbPjR3y4gMh5U5UlRviG9pu7ljN7x8Sa
|
||||
XKPT6AYvDFCe3Xux0EQO2nYVkB8jkEyztZ7DjkF36ww52k/aGD+aQAahqzAgumVK
|
||||
JsQ4nqek8E1FFquX4uoiVZwulWGQE5XDTJBOzLLHvEmk1xKY1AJ9eEUiUm5eKEvM
|
||||
kVgQo9nRdkwqWOfV2qmYHQ5co6wpHWL9Vl+jeODeonBmsVcaYXc32bOvtKfJL2rW
|
||||
8IPrvCEieFlcrK8bnjMPZe1rOichri31nsHfrO8LZFu+ZSU2xsjd4Ao0Fm99/27X
|
||||
rm+e0XsHpKDok+nYUZ3O8cA16fcn2uZulbihSZDbtaxFJvzHDoBl/reJhVKsNVb8
|
||||
f99ygx1435GG9NUMTHJtlMel/vu6uujIvFVIfd9Dl3anjaPNBnhuXQCaZUISRMhF
|
||||
jAiajQJzSzJknEDss+G+WHTbPip7xRl1L43AHdIqlFRwPVRV7pQWi99+2YOtYYo4
|
||||
YZmqksQeBIi8gS1T7sDIheSkvr9nr40W4ez6RIlgNYFm+RvVue1tQJNoZYH+6lvT
|
||||
Qoe+YOSaXotOV9mBd8ffH84bYoMvKooldRE4q3azunCl3HDcZcjarrCFmqzIDzQw
|
||||
yAlhTb8+aXDY2EHCYBmbwV9AcgPtQ5LuCPeAsh+g9pNhaqF/f/ljLA==
|
||||
-----END CERTIFICATE-----
|
|
@ -1,52 +0,0 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCpnPP8ck7HKPVo
|
||||
rhtIZfxY8Mf+rnhIhenRMzDTmGtq53dhbg4I1kGcy8WZkyh6QaxQPyrNKZXBAQtE
|
||||
LSWGgjL3PnVsKWVtQT2YzBSIhHTXct6RbYpd2yLmK77IOmu0DtWF0QX5TxEB/ryD
|
||||
n92uGxIlKptDxqLrsbN1GhZYkXn0jVp6jIqC32YnxJVItzhSqCnseJrF96XeXZKl
|
||||
N5TmSbpAwbjyZCkCCWi8q5CLpjrhFdud754pmuiJ03xQn9LXhvIxOzQ8jPiINr+c
|
||||
R19sZHiAwOdb028gjL8VYdvAiOiJ85UwPwPBeCpJkS4FVWxDpBhQXjUGbr5YiACc
|
||||
UNenoEjbSut80VhyAqHVPtEY4WMFclua6vuszGQW4cyhWLKO2pN2lno0EakXDZT9
|
||||
P53OKB1gFDvpyK3LmD6B4OvddIBCbSYgAotkcojOlcHVDYJUVcN6VgiJQann/QLQ
|
||||
Xcgu8K0CUY4hVvtHV7RlfMc1QcOote5lpUWDpByYWw8TAUHa7MGXVjNu4q//w3SV
|
||||
RW1RyxVjtgOznLvAM+kFZFV3epS9A9zyk0XyxDuqjz8oLQwKhzms/ORaDa7WPlqy
|
||||
J9mkwRWgs+zthFp5fcMJ4onwXqR9Yem4UMsugBEFFn/3kto2ZsAgDZjrVnlWOpee
|
||||
645S3GRtNjpu0LFqIfYeuZmowDgYQQIDAQABAoICADrBq2fldVLa5oDX542h/tQU
|
||||
vUOFzxdYhJI7CIwUfgmvm5R92pDHID2f/Zjg+KG5hGbcKwidgko1AWEhvqElE2DB
|
||||
G05X3NIHSr5W3DoaoJtOKLn6V3eCBUn1F4cnbc4XYXKU4VvnPv4Q798tD09UA2oq
|
||||
o1TMR/4cNg239svBwZytJw3TB9ykZTAbkpd5GSLRLIzFjuBLlQM+KSHg6k0Id2Qd
|
||||
d+NIPUh+V/EcAdvOvxDgUI8axhCloC62u5b2dsTA87+IQeVD9IjDZodN1kmnWHNJ
|
||||
4BvYV+PPvhY7KzQ8eUnovuLSwYtRBF0t1OJ2ICYif2W/7OCIlpn2qzd7bemcxf/Z
|
||||
EhZDW856ZluZy5QVAOEWslHCF2di1PoxSJSoyhdHeJHd8QLMUxpKWMAJwakwNJ7W
|
||||
LximvjCihxq+MoGXhOtQLKFV5YxXqt0/cMaU4QHromInP7o4eSdleQd91W5c5+Fl
|
||||
4gj9ICHpVXOhbuhO+cx/k53nEMHsyA4XotHgcrF50wUy4Ow9FqaGG0gmL3GEWzbn
|
||||
S2KUEfPC8nUqezdqtaPpjmQbL4rTp11pYsrN3pd48j+WNodqu2Mi2r3kT3EcvosI
|
||||
8okAdW82GhMWZjmGn6SLB//RegP7E28sbqEFZFUPvOd2g+Lma/kVAx7qI4/5ndey
|
||||
pffNnfHgqqNiSe9WsG0BAoIBAQDcKtrKpuBpb3ENZf1Q0EWBi1RveilKGbaHPrq0
|
||||
ESiiLfG1nyL5o0LI/LEYspjiad5Z/VDPLpRux7yI2fDHYeDsMvVeHCjvJe2Csw4D
|
||||
iYSeHGIBMgsMI8573+t0DqFHdfe97Ds1JFflpotnAo8dBwu6bxvXLofCQZuLwa7E
|
||||
73G515JqK9Koxv32Wp6RnnkKRxRPwFpmjbepwWf2nUvndyy0YjlmpNSsg89Nc2cA
|
||||
a86k/V2Wt7Nt9I4hPZ9E4CeW2DakJnm5fasBEPiK7qtt2bp+/YPQNACGJarIy+3F
|
||||
OcRdA0gTDZ9x9H3zHS9G5Dn1Szp3dG7dhVoIMyRILAG5d8yxAoIBAQDFN8h48RPH
|
||||
K85guCiDrIO1dpG773YFJ/vy6zMXKf8bF4Hw2LaIO1adKvMIIJbpvGcvmFWLsU+I
|
||||
XbZjeoMe9LH60m0tIqGxvV7SSbHPX/1MmDOoSw83e0x0LOKaWocmorxBhtOdeAB9
|
||||
WT5xb7K9exgUKBi2dYLW0P+WUG4n0M4RivB6y1mKIRNtqcaDu0ZbyW+cAF7G4RlM
|
||||
CFV89dcM36DwvvVe4R7HPSk+tDgm01gocYEntC6K26BeW65k2Sfe9CJAEGazdbak
|
||||
u8v9PJ55XZWyGkIVpoKF4loF7BYdzoOmgkYM+f0afMyhmBfJ5H6fNFYLgrutmg4b
|
||||
8YCvaL2D2aiRAoIBAQCnMvxZLgX6zCEE1dFcT+6ZBKCo0BMPLRvK9b6ABQ/gqheH
|
||||
oETFZFDRpeUwJmGogFHV8WQvEuaygokRPMF4CULw3XotcCE+DIWk3inkUcke8dsT
|
||||
oVd2brLerBx5VKryRApSd1Y3c1Q1GReAsRbSKomjmcGA1ttOkNh5eCsrb9PkGGwe
|
||||
qQ0gE47GSedmGv086uHn9uIwQ6uZBUHYrXf5Xi3bB0UkSEUihi8mWF9+mGCkN62d
|
||||
SgC/nhtZ7xxHCBvImIZWfsmuLltxQdweVkZl9BWHXyt9MCC9v1lFiGkXgFk5ccaI
|
||||
ga32sn/74swGgEfrmqfaE9gl7qGC3KPPE2xz1yDhAoIBAEoECYT6VUXmtumts+bX
|
||||
FAdCnKc/07dTrkcY5m/HHyr3w5i0fKzcOEF8IQHn2TuXrdI7BcALp6GyKgVjsVoo
|
||||
07Mizj6mRLEENVYOumDt0Y6xgJGkue1EpQjk35a2awqhAK5G/5yVsPlaSQkhtp9O
|
||||
V1cZRU0VBSnB/mpXfUAMKYqD7oTnVI92omgB07MU0e8Yxn5x1SAm0uuqJQtk6HS4
|
||||
aRpxUH1vV7HGznfuAzTvFKL5FlPkV6Ndke5X0jefGEugrEoG3cR0ZTumD4TW/1Ll
|
||||
QI07NZoSh+HfdZHLbPF61AXl1oyANfF+7P2oqyTmUG9HoRNo2S7qJmluVbF/ScD2
|
||||
K0ECggEBAJj8ZlacBoTxXy9mf6pMnDpCznzhs1AHQMZ6XIqgW3QoUNkAm4Fnf7G4
|
||||
PdhXRAm2NeQ+CSBtmHl7PZHzLlF4RcQnC9DQHy/P+PGfcYfwWNqZyF7pAkwhtFYK
|
||||
zsxekl6PxjZ6DvclwU3jgQ4OiNElcF2Yjhtwh0nryyz+SktJieFKoWUz1F71tONw
|
||||
5TNbiKb1sWKzZvvcvyjUdLuMH/HzfNg5ZxxiJHrD0Zga1jLMzZil+eYhIbUuQT9b
|
||||
IdEYCvfruwoF/SjjPH/aDPu6jZug/iE288Msqm/YGC9uTW1/GLhrpIyWdposa1Jh
|
||||
Fdo3SqBMHZO0uGFt0FSpZNv0jNUJdB0=
|
||||
-----END PRIVATE KEY-----
|
|
@ -1,200 +0,0 @@
|
|||
[unix_http_server]
|
||||
file=/tmp/supervisor.sock ; (the path to the socket file)
|
||||
|
||||
[supervisord]
|
||||
;logfile=/tmp/supervisord.log ; (main log file;default.conf $CWD/supervisord.log)
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0 ; (max main logfile bytes b4 rotation;default.conf 50MB)
|
||||
logfile_backups=10 ; (num of main logfile rotation backups;default.conf 10)
|
||||
loglevel=info ; (log level;default.conf info; others: debug,warn,trace)
|
||||
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default.conf supervisord.pid)
|
||||
nodaemon=false ; (start in foreground if true;default.conf false)
|
||||
minfds=1024 ; (min. avail startup file descriptors;default.conf 1024)
|
||||
minprocs=200 ; (min. avail process descriptors;default.conf 200)
|
||||
user=root ;
|
||||
|
||||
; the below section must remain in the config file for RPC
|
||||
; (supervisorctl/web interface) to work, additional interfaces may be
|
||||
; added by defining them in separate rpcinterface: sections
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
|
||||
|
||||
[program:php7-fpm]
|
||||
command=php-fpm%(ENV_PHP_VERSION)s -F
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=5
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:nginx]
|
||||
command=nginx
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-webhooks]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-webhooks',APP_INCLUDE='/usr/src/code/app/workers/webhooks.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-mails]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-mails',APP_INCLUDE='/usr/src/code/app/workers/mails.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-audits]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-audits',APP_INCLUDE='/usr/src/code/app/workers/audits.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-usage]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-usage',APP_INCLUDE='/usr/src/code/app/workers/usage.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-tasks]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-tasks',APP_INCLUDE='/usr/src/code/app/workers/tasks.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-deletes]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-deletes',APP_INCLUDE='/usr/src/code/app/workers/deletes.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-certificates]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-certificates',APP_INCLUDE='/usr/src/code/app/workers/certificates.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-functions]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-functions',APP_INCLUDE='/usr/src/code/app/workers/functions.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-schedule]
|
||||
command=php /usr/src/code/vendor/bin/resque-scheduler
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s',RESQUE_PHP='/usr/src/code/vendor/autoload.php'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
412
docker/www.conf
412
docker/www.conf
|
@ -1,412 +0,0 @@
|
|||
; Start a new pool named 'www'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'access.log'
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or /usr) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
||||
; a specific port;
|
||||
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all IPv4 addresses on a
|
||||
; specific port;
|
||||
; '[::]:port' - to listen on a TCP socket to all addresses
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
; listen = /var/run/php5-fpm.sock
|
||||
listen = 127.0.0.1:9000
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
|
||||
;listen.backlog = 65535
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0660
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
;listen.mode = 0660
|
||||
; When POSIX Access Control Lists are supported you can set them using
|
||||
; these options, value is a comma separated list of user/group names.
|
||||
; When set, listen.owner and listen.group are ignored
|
||||
;listen.acl_users =
|
||||
;listen.acl_groups =
|
||||
|
||||
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 127.0.0.1
|
||||
|
||||
; Specify the nice(2) priority to apply to the pool processes (only if set)
|
||||
; The value can vary from -19 (highest priority) to 20 (lower priority)
|
||||
; Note: - It will only work if the FPM master process is launched as root
|
||||
; - The pool processes will inherit the master process priority
|
||||
; unless it specified otherwise
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 5
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 2
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 1
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: /usr/share/php5/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;pm.status_path = /status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;ping.path = /ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: output header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
;slowlog = log/$pool.log.slow
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_slowlog_timeout = 0
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 0
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
chdir = /
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
;catch_workers_output = yes
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
; pool configuration are added.
|
||||
; Setting to "no" will make all environment variables available to PHP code
|
||||
; via getenv(), $_ENV and $_SERVER.
|
||||
; Default Value: yes
|
||||
;clear_env = no
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; exectute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
;env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
|
@ -1 +1 @@
|
|||
Delete document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.
|
||||
Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.
|
|
@ -1 +1 @@
|
|||
Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
||||
Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
@ -1 +1 @@
|
|||
Get document by its unique ID. This endpoint response returns a JSON object with the document data.
|
||||
Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
@ -1 +1 @@
|
|||
Update collection by its unique ID.
|
||||
Update a collection by its unique ID.
|
|
@ -0,0 +1 @@
|
|||
Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
790
docs/specs/authentication.drawio.svg
Normal file
790
docs/specs/authentication.drawio.svg
Normal file
|
@ -0,0 +1,790 @@
|
|||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1081px" height="681px" viewBox="-0.5 -0.5 1081 681" content="<mxfile host="452ed2f0-2570-47da-af81-6dc9d9d310bc" modified="2021-01-16T10:45:03.749Z" agent="5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.52.1 Chrome/83.0.4103.122 Electron/9.3.5 Safari/537.36" etag="Eey95lwfZrDIZfUKoZOi" version="13.10.0" type="embed"><diagram id="WOshqXSVd2VkRfcggtcB" name="Page-1">7V1bl5s2EP41Pid92D0ydz/6lqRtLnuy2yb7KINs08XIBbxe59dXgGSDJDaOjYUpyUNrJCFg5vukmdFI29PHq5d3EVwvP2IPBT0NeC89fdLTtL5uO+R/ackuLzEGIC9YRL5HGx0K7v3viBayZhvfQ3GpYYJxkPjrcqGLwxC5SakMRhHelpvNcVB+6houkFBw78JALP3qe8mSlmoAHCreI3+xTPiaGXSfFhHehPSBIQ5RXrOCrB/aNF5CD28LRfq0p48jjJP81+pljIJUrkxk+X1vK2r37xyhMDnqBoO+R7Jj3408IgZ6iaNkiRc4hMH0UDrKPg2lPQBydWjzAeM1KeyTwn9QkuyoTuEmwaRomawCWote/ORbevutSa8eCzWTF9pzdrGjF/l7pi9X+am0KMabyGWtzL1QCVARXqEk2pE2EQpg4j+X+4IUMYt9u/2td9gnT9EARbfNVE2xrTmg3EUCowVK6F0H+ZMfhdc4FGVaqdCQmff8DIMNfd175G4igigwxvjJR4IGy/rZLv0E3a9hJpIt4WpZF3ES4Sc0xgGOsrt1TTcMk9w8mvtBUCgnqHY8PS3HYVIoB9k/Uh7AGQoIHDwUseoM+Ux3zyhK0Mvr2hM1RW+wDE7iTAPbEjfzsmWBlgaoVm5JLa/pwGoLS4g0o13hpvTysVh3uC27OpNdNh2XM7TXxLijlWILxJiuoJ82SfvQwB2M4y2BY838GJoAGEDkh+cAYEv4Mc/+XZofplXmx54LSvjhtIUfJ+J8oGYWAZebRQYCWT4PNwQYhCYRfiaWVtQJmthagzRh/RaU0ARvTuOAbYljvW4pGuuZoAqS+4hWs9pB2xLbx1EJWr3NoB1IQOuoAq1ouQ/X604gtg8ahewvc13KBk1irudsPte0GUYR3BUarFOTJa62fAY8PCwuTPEjS6ncnvzI3+BU80gTfYk/vj50wiJynCYtotY4DoqZKpm3HEPVvCX6CsM7cv0n2nWCEcLkpZQS+nU4CWrxrmsi3m1dEd71viDxdxEMEyK+VOWpkyyR/4cUgmWZwcBfhOS3Sz6VuCb6KIWh78JgSCtWvufl6kGx/x3Osv5SqdH5knRujnrm5DUc0+UOenNv71QWJawDuehoTzfgFjDjlEL8hvZ+akSDNcHzeYzODVYwNBQVskFxUvPoc52ms1G1tKBk8NGbnY/ty0/InLItAAd9WwqPiW2BM4Y0QxzSDFVTOHt4gUF3m1ngu6Ts3sVrFNfMJQD6k9FYFC8AJkDzpmZynkuGrZJLZmu4pIwTkhiiOk5YAidYDLFLnOCDiWo5YbeGE/v5ZW8NP5Ynm6bnF0fCJWUmsyNwabyJE7wqcMkKyFuNZoRe1iLJPjMvSVFfgoD17wazips4U+KQNOiD9cuhkvXyZoLmfpiZ5jgk/3lKnVLgRoh8IA5/Yw8hH5A/hz27A8wW/Fa11BajBhkSSNHfxDHyMv10Qg8mt8ZoqbTgWR/XH1Gr0lm1ls8xOupfvO+XtWzanPbydxAW74WOTKcCLj/IAvjZmDsfQzfN12Pu/Htx7c+OuRtMV7+QWprSa0fqqQATOur3eQgdifmfhar4oKax2kwM9pqxeq7bJlekYbVsVBVeuGmkiukaE5jAGYzR+Sb5QGaRT6GbppF5OA0uLYncCHZQtPLjODP4VNjje1eqyvlqJteMg4atq7QDxQjgFxykftnlzPF2qEGtOS7mADUxk5w2xhuycJ2q7ClDDNdRANeL2foXgdI7mD7Z0uJZGRoN7nwwxMSYFuFXEiIzK5ZG68evGCL76geeCyNPMhFP3/aIMeYMrx/dFwC00gF50AR+1W1VoOZkGfOaIsyzh5cW7rN8AB7wEU4FO1x0Zlmfw7yu0hY0WxNpUZt1ZGoSrqhajmQPlyxHVpBl1Z0dDzxbVM4QZsM5MFfLFklCi6lqs6cpurPZXooKqsCO7LPgeGIonVVE1/avOMum+H0iKmaTVunDnjkiteakk9pROoqJ7nMTw9qJQ41ko4p57h7coyUnurwPCK4qcJ2kVd3Gtal01BHd6hbhWrKtw1IVkGAPl+OavAX5KJCG2I4A+Vvy88vnD9OuIl7lSG6JTvU+b1E2IlE3odtjkqVyTLLEDSTT0GMrh5dcdEP0MT228tZPe8zTrrqbCMcnYCldeLNEv749E5SlSyYoVT6eJS5dXyQvuwVLPhqHYKVrPpboa7cIwaYEwbYqBIsu8Zpuu7l2BF8CtEqtpDb7u5bE37VU+buW6O9C1yWC6MbCDI9apSszVpu9WUvizdqqvFlL9GYJrFB8GyHodRO4KodbW3RKc/FvIyLbTspfafDdFl3OvafJfL3b29uCFzi7VO5lO5SjlBwN7/y91hVEW+Jdnp1HfrRSRO+SHipREfR8g8Ng91vdbLnKFFlhn3xfJVte2Zfdyw7ypcuK+QWNWV8kF/QqlSNs2FaqnDbnf7J3LRmoF9oNyDFI1zjhH7tvhe/I4DfA1HcmsC06Hy0/98iuCPQczj3qc8ce0UnhKo49skWX5hPeT09gJN3Ckx7iTL6fSLszGzrEfe4qR0RH9HxaNCJKoqP2uYEm+UAm7OE8eUgUerrgmOj8786CcyoiMocxUePOgrumo+CcX8mYUiI7EtNG2V/eYA+XZJKEz/WHf67zlFDeZ1J6SKjTmgjDifCW5BpryuAtrn++f3i4IyXvEfRkCfrfbobrdRb5vKn/kNzrDLCJJ7yrXKJ2RLf0eBXVf7L3daqIP9lbrYZkK1t1HAD2CWchOxQg4g+lVtnjYX/ZZZOddOKbjyXJThYEYN5YshOv5cGRSuat8SOUTC4Pf5kwN+YOf/pRn/4H</diagram></mxfile>">
|
||||
<defs/>
|
||||
<g>
|
||||
<path d="M 620 150 L 620 183.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 620 188.88 L 616.5 181.88 L 620 183.63 L 623.5 181.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="560" y="110" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 130px; margin-left: 561px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Secure Cookie
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="620" y="134" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Secure Cookie
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 540 70 L 540 90 L 620 90 L 620 103.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 620 108.88 L 616.5 101.88 L 620 103.63 L 623.5 101.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="480" y="30" width="120" height="40" fill="#d80073" stroke="#a50040" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 50px; margin-left: 481px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Email / Password
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="540" y="54" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Email / Password
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 700 70 L 700 90 L 620 90 L 620 103.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 620 108.88 L 616.5 101.88 L 620 103.63 L 623.5 101.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="640" y="30" width="120" height="40" fill="#d80073" stroke="#a50040" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 50px; margin-left: 641px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
OAuth Provider
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="700" y="54" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
OAuth Provider
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 620 360 L 620 380 L 620 360 L 620 373.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 620 378.88 L 616.5 371.88 L 620 373.63 L 623.5 371.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="560" y="190" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 210px; margin-left: 561px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Member
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="620" y="214" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Member
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 1020 360 L 1020 380 L 1020 360 L 1020 373.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 1020 378.88 L 1016.5 371.88 L 1020 373.63 L 1023.5 371.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="960" y="190" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 210px; margin-left: 961px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
App
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="1020" y="214" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
App
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 860 70 L 860 170 L 620 170 L 620 183.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 620 188.88 L 616.5 181.88 L 620 183.63 L 623.5 181.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="800" y="30" width="120" height="40" fill="#d80073" stroke="#a50040" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 50px; margin-left: 801px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
JWT
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="860" y="54" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
JWT
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 1020 70 L 1020 103.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 1020 108.88 L 1016.5 101.88 L 1020 103.63 L 1023.5 101.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="960" y="30" width="120" height="40" fill="#d80073" stroke="#a50040" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 50px; margin-left: 961px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
AP Key
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="1020" y="54" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
AP Key
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 380 230 L 380 313.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 380 318.88 L 376.5 311.88 L 380 313.63 L 383.5 311.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 275px; margin-left: 380px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">
|
||||
Granted with
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="380" y="278" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Granted with
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="320" y="190" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 210px; margin-left: 321px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Guest
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="380" y="214" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Guest
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 410 420 L 410 505 L 740 505 L 740 583.63" fill="none" stroke="#2d7600" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 740 588.88 L 736.5 581.88 L 740 583.63 L 743.5 581.88 Z" fill="#2d7600" stroke="#2d7600" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="320" y="380" width="120" height="40" fill="#0050ef" stroke="#001dbc" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 400px; margin-left: 321px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Public Scopes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="380" y="404" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Public Scopes
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 650 420 L 650 505 L 740 505 L 740 583.63" fill="none" stroke="#2d7600" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 740 588.88 L 736.5 581.88 L 740 583.63 L 743.5 581.88 Z" fill="#2d7600" stroke="#2d7600" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="560" y="380" width="120" height="40" fill="#0050ef" stroke="#001dbc" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 400px; margin-left: 561px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Member Scopes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="620" y="404" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Member Scopes
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 1050 420 L 1050 660 L 806.37 660" fill="none" stroke="#2d7600" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 801.12 660 L 808.12 656.5 L 806.37 660 L 808.12 663.5 Z" fill="#2d7600" stroke="#2d7600" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="960" y="380" width="120" height="40" fill="#0050ef" stroke="#001dbc" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 400px; margin-left: 961px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Custom Scopes
|
||||
<br/>
|
||||
<font style="font-size: 10px">
|
||||
(Defined on key creation)
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="1020" y="404" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Custom Scopes...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="440" y="590" width="120" height="40" fill="#0050ef" stroke="#001dbc" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 610px; margin-left: 441px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Scope Validation
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="500" y="614" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Scope Validation
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 620 420 L 620 460 L 500 460 L 500 583.63" fill="none" stroke="#001dbc" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 500 588.88 L 496.5 581.88 L 500 583.63 L 503.5 581.88 Z" fill="#001dbc" stroke="#001dbc" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<path d="M 1020 420 L 1020 460 L 500 460 L 500 583.63" fill="none" stroke="#001dbc" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 500 588.88 L 496.5 581.88 L 500 583.63 L 503.5 581.88 Z" fill="#001dbc" stroke="#001dbc" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<path d="M 380 420 L 380 460 L 500 460 L 500 583.63" fill="none" stroke="#001dbc" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 500 588.88 L 496.5 581.88 L 500 583.63 L 503.5 581.88 Z" fill="#001dbc" stroke="#001dbc" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="680" y="640" width="120" height="40" fill="#60a917" stroke="#2d7600" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 660px; margin-left: 681px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Database
|
||||
<br/>
|
||||
<font style="font-size: 9px">
|
||||
Each doc has permission
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="740" y="664" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Database...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="680" y="590" width="120" height="40" fill="#60a917" stroke="#2d7600" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 610px; margin-left: 681px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Roles Validation
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="740" y="614" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Roles Validation
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 60 150 L 60 183.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 60 188.88 L 56.5 181.88 L 60 183.63 L 63.5 181.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="110" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 130px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; word-wrap: normal; ">
|
||||
Roles
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="134" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle" font-weight="bold">
|
||||
Roles
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 60 230 L 60 250 L 60 220 L 60 233.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 60 238.88 L 56.5 231.88 L 60 233.63 L 63.5 231.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="190" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 210px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Wildcard
|
||||
<br/>
|
||||
*
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="214" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Wildcard...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 60 280 L 60 300 L 60 270 L 60 283.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 60 288.88 L 56.5 281.88 L 60 283.63 L 63.5 281.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="240" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 260px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Guset
|
||||
<br/>
|
||||
role:guest
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="264" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Guset...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 60 330 L 60 333.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 60 338.88 L 56.5 331.88 L 60 333.63 L 63.5 331.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="290" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 310px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Member
|
||||
<br/>
|
||||
role:member
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="314" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Member...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 60 380 L 60 383.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 60 388.88 L 56.5 381.88 L 60 383.63 L 63.5 381.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="340" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 360px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
App
|
||||
<br/>
|
||||
role:app
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="364" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
App...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="390" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 410px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
User ID
|
||||
<br/>
|
||||
user:[ID]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
User ID...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 60 480 L 60 500 L 60 470 L 60 483.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 60 488.88 L 56.5 481.88 L 60 483.63 L 63.5 481.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="440" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 460px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Team ID
|
||||
<br/>
|
||||
team:[ID]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Team ID...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 60 530 L 60 550 L 60 520 L 60 533.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 60 538.88 L 56.5 531.88 L 60 533.63 L 63.5 531.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="490" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 510px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Team ID + Role
|
||||
<br/>
|
||||
team:[ID]/[ROLE]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="514" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Team ID + Role...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="540" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 560px; margin-left: 1px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Member ID
|
||||
<br/>
|
||||
member:[ID]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="564" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Member ID...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="440" y="640" width="120" height="40" fill="#0050ef" stroke="#001dbc" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 660px; margin-left: 441px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Endpoints
|
||||
<br/>
|
||||
<font style="font-size: 9px">
|
||||
Each endpoint has 1 scope
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="500" y="664" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Endpoints...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 200 150 L 200 183.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 200 188.88 L 196.5 181.88 L 200 183.63 L 203.5 181.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="140" y="110" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 130px; margin-left: 141px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; word-wrap: normal; ">
|
||||
Scopes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="200" y="134" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle" font-weight="bold">
|
||||
Scopes
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 200 230 L 200 250 L 200 220 L 200 233.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 200 238.88 L 196.5 231.88 L 200 233.63 L 203.5 231.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="140" y="190" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 210px; margin-left: 141px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
public
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="200" y="214" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
public
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 200 280 L 200 300 L 200 270 L 200 283.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 200 288.88 L 196.5 281.88 L 200 283.63 L 203.5 281.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="140" y="240" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 260px; margin-left: 141px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
account
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="200" y="264" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
account
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 200 330 L 200 350 L 200 320 L 200 333.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 200 338.88 L 196.5 331.88 L 200 333.63 L 203.5 331.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="140" y="290" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 310px; margin-left: 141px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
files.read
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="200" y="314" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
files.read
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="140" y="340" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 360px; margin-left: 141px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
files.write
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="200" y="364" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
files.write
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="140" y="390" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 410px; margin-left: 141px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
<b>
|
||||
...
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="200" y="414" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 380 360 L 380 373.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 380 378.88 L 376.5 371.88 L 380 373.63 L 383.5 371.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="320" y="320" width="120" height="40" fill="#60a917" stroke="#2d7600" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 340px; margin-left: 321px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Guest Role
|
||||
<br/>
|
||||
(only)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="380" y="344" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Guest Role...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="560" y="320" width="120" height="40" fill="#60a917" stroke="#2d7600" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 340px; margin-left: 561px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Member / User / Team Roles
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="620" y="344" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Member / User / Team...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 620 230 L 620 313.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 620 318.88 L 616.5 311.88 L 620 313.63 L 623.5 311.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 269px; margin-left: 618px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">
|
||||
Granted with
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="618" y="272" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Granted with
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="960" y="320" width="120" height="40" fill="#60a917" stroke="#2d7600" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 340px; margin-left: 961px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
No Role Base
|
||||
<br/>
|
||||
Authentication
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="1020" y="344" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
No Role Base...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 1020 230 L 1020 313.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 1020 318.88 L 1016.5 311.88 L 1020 313.63 L 1023.5 311.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 266px; margin-left: 1022px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">
|
||||
Granted with
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="1022" y="269" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Granted with
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 380 70 L 380 90 L 620 90 L 620 103.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 620 108.88 L 616.5 101.88 L 620 103.63 L 623.5 101.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="320" y="30" width="120" height="40" fill="#d80073" stroke="#a50040" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 50px; margin-left: 321px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
Team Invite
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="380" y="54" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Team Invite
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 1020 150 L 1020 183.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 1020 188.88 L 1016.5 181.88 L 1020 183.63 L 1023.5 181.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="960" y="110" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 130px; margin-left: 961px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
HTTP Header
|
||||
<br/>
|
||||
X-Appwrite-Key
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="1020" y="134" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
HTTP Header...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="800" y="110" width="120" height="40" fill="#bac8d3" stroke="#23445d" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 130px; margin-left: 801px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
HTTP Header
|
||||
<br/>
|
||||
X-Appwrite-JWT
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="860" y="134" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
HTTP Header...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="800" y="0" width="120" height="20" fill="#6a00ff" stroke="#3700cc" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 10px; margin-left: 801px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #ffffff; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
<font style="font-size: 10px">
|
||||
Not Released Yet
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="860" y="14" fill="#ffffff" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Not Released Yet
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Viewer does not support full SVG 1.1
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
After Width: | Height: | Size: 63 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 63 KiB |
|
@ -17,6 +17,7 @@ const configApp = {
|
|||
'public/scripts/init.js',
|
||||
|
||||
'public/scripts/services/alerts.js',
|
||||
'public/scripts/services/api.js',
|
||||
'public/scripts/services/console.js',
|
||||
'public/scripts/services/date.js',
|
||||
'public/scripts/services/env.js',
|
||||
|
@ -34,6 +35,7 @@ const configApp = {
|
|||
'public/scripts/views/service.js',
|
||||
|
||||
'public/scripts/views/analytics/event.js',
|
||||
'public/scripts/views/analytics/activity.js',
|
||||
'public/scripts/views/analytics/pageview.js',
|
||||
|
||||
'public/scripts/views/forms/clone.js',
|
||||
|
|
30
public/dist/scripts/app-all.js
vendored
30
public/dist/scripts/app-all.js
vendored
|
@ -2084,7 +2084,7 @@ paths=expression.getPaths();let prv=element.$lsSkip;element.$lsSkip=!result;if(!
|
|||
else{element.style.removeProperty('display');element.style.removeProperty('visibility');}
|
||||
if(prv===true&&element.$lsSkip===false){view.render(element)}};check();for(let i=0;i<paths.length;i++){let path=paths[i].split('.');while(path.length){container.bind(element,path.join('.'),check);path.pop();}}}});window.ls.container.get('view').add({selector:'data-ls-loop',template:false,nested:false,controller:function(element,view,container,window,expression){let expr=expression.parse(element.getAttribute('data-ls-loop'));let as=element.getAttribute('data-ls-as');let key=element.getAttribute('data-ls-key')||'$index';let limit=parseInt(expression.parse(element.getAttribute('data-limit')||'')||-1);let debug=element.getAttribute('data-debug')||false;let echo=function(){let array=container.path(expr);let counter=0;array=(!array)?[]:array;let watch=!!(array&&array.__proxy);while(element.hasChildNodes()){element.removeChild(element.lastChild);element.lastChild=null;}
|
||||
if(array instanceof Array&&typeof array!=='object'){throw new Error('Reference value must be array or object. '+(typeof array)+' given');}
|
||||
let children=[];element.$lsSkip=true;for(let prop in array){if(counter==limit){break;}
|
||||
let children=[];element.$lsSkip=true;element.style.visibility=(0===array.length&&element.style.visibility=='')?'hidden':'visible';for(let prop in array){if(counter==limit){break;}
|
||||
counter++;if(!array.hasOwnProperty(prop)){continue;}
|
||||
children[prop]=template.cloneNode(true);element.appendChild(children[prop]);(index=>{let context=expr+'.'+index;container.addNamespace(as,context);if(debug){console.info('debug-ls-loop','index',index);console.info('debug-ls-loop','context',context);console.info('debug-ls-loop','context-path',container.path(context).name);console.info('debug-ls-loop','namespaces',container.namespaces);}
|
||||
container.set(as,container.path(context),true,watch);container.set(key,index,true,false);view.render(children[prop]);container.removeNamespace(as);})(prop);}
|
||||
|
@ -2095,7 +2095,19 @@ return;}
|
|||
http.get(source).then(function(element){return function(data){element.innerHTML=data;view.render(element);element.dispatchEvent(new CustomEvent('template-loaded',{bubbles:true,cancelable:false}));}}(element),function(){throw new Error('Failed loading template');});};check(true);for(let i=0;i<paths.length;i++){let path=paths[i].split('.');while(path.length){container.bind(element,path.join('.'),check);path.pop();}}}});window.ls.error=function(){return function(error){window.console.error(error);if(window.location.pathname!=='/console'){window.location='/console';}};};window.addEventListener("error",function(event){console.error("ERROR-EVENT:",event.error.message,event.error.stack);});document.addEventListener("account.deleteSession",function(){window.location="/auth/signin";});document.addEventListener("account.create",function(){let container=window.ls.container;let form=container.get('serviceForm');let sdk=container.get('console');let promise=sdk.account.createSession(form.email,form.password);container.set("serviceForm",{},true,true);promise.then(function(){window.location='/console';},function(error){window.location='/auth/signup?failure=1';});});(function(window){"use strict";window.ls.container.set('alerts',function(window){return{list:[],ids:0,counter:0,max:5,add:function(message,time){var scope=this;message.id=scope.ids++;message.remove=function(){scope.remove(message.id);};scope.counter++;scope.list.unshift(message);if(scope.counter>scope.max){scope.list.pop();scope.counter--;}
|
||||
if(time>0){window.setTimeout(function(message){return function(){scope.remove(message.id)}}(message),time);}
|
||||
return message.id;},remove:function(id){let scope=this;for(let index=0;index<scope.list.length;index++){let obj=scope.list[index];if(obj.id===parseInt(id)){scope.counter--;if(typeof obj.callback==="function"){obj.callback();}
|
||||
scope.list.splice(index,1);};}}};},true,true);})(window);(function(window){"use strict";window.ls.container.set('console',function(window){var sdk=new window.Appwrite();sdk.setEndpoint(APP_ENV.API).setProject('console').setLocale(APP_ENV.LOCALE);return sdk;},true);})(window);(function(window){"use strict";window.ls.container.set('date',function(){function format(format,timestamp){var jsdate,f
|
||||
scope.list.splice(index,1);};}}};},true,true);})(window);(function(window){"use strict";window.ls.container.set('appwrite',function(window,env){let config={endpoint:'https://appwrite.io/v1',};let http=function(document,env){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(params.hasOwnProperty(p)){str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]));}}
|
||||
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
|
||||
if(typeof path!=='string'){throw new Error('var path must be of type string');}
|
||||
if(typeof headers!=='object'){throw new Error('var headers must be of type object');}
|
||||
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value);}
|
||||
for(let key in globalHeaders){if(globalHeaders.hasOwnProperty(key)){if(!headers[globalHeaders[key].key]){headers[globalHeaders[key].key]=globalHeaders[key].value;}}}
|
||||
if(method==='GET'){for(let param in params){if(param.hasOwnProperty(key)){path=addParam(path,key,params[key]);}}}
|
||||
switch(headers['content-type']){case'application/json':params=JSON.stringify(params);break;case'multipart/form-data':let formData=new FormData();for(let param in params){if(param.hasOwnProperty(key)){formData.append(key,param[key]);}}
|
||||
params=formData;break;}
|
||||
return new Promise(function(resolve,reject){let request=new XMLHttpRequest(),key;request.withCredentials=true;request.open(method,path,true);for(key in headers){if(headers.hasOwnProperty(key)){request.setRequestHeader(key,headers[key]);}}
|
||||
request.onload=function(){if(4===request.readyState&&399>=request.status){let data=request.response;let contentType=this.getResponseHeader('content-type');contentType=contentType.substring(0,contentType.indexOf(';'));switch(contentType){case'application/json':data=JSON.parse(data);break;}
|
||||
resolve(data);}else{reject(new Error(request.statusText));}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,false);}
|
||||
request.onerror=function(){reject(new Error("Network Error"));};request.send(params);})};return{'get':function(path,headers={},params={}){return call('GET',path+((params.length>0)?'?'+buildQuery(params):''),headers,{});},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress);},'put':function(path,headers={},params={},progress=null){return call('PUT',headers,params,progress);},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress);},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress);},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let analytics={create:function(id,source,activity,url){return http.post('/analytics',{'content-type':'application/json'},{id:id,source:source,activity:activity,url:url,version:env.VERSION,setup:env.SETUP});},};return{analytics:analytics,};},true);})(window);(function(window){"use strict";window.ls.container.set('console',function(window){var sdk=new window.Appwrite();sdk.setEndpoint(APP_ENV.API).setProject('console').setLocale(APP_ENV.LOCALE);return sdk;},true);})(window);(function(window){"use strict";window.ls.container.set('date',function(){function format(format,timestamp){var jsdate,f
|
||||
var txtWords=['Sun','Mon','Tues','Wednes','Thurs','Fri','Satur','January','February','March','April','May','June','July','August','September','October','November','December']
|
||||
var formatChr=/\\?(.?)/gi
|
||||
var formatChrCb=function(t,s){return f[t]?f[t]():s}
|
||||
|
@ -2291,9 +2303,12 @@ running=false;element.style.backgroud='transparent';element.classList.add("load-
|
|||
parsedFailure[i].charAt(0).toUpperCase()+
|
||||
parsedFailure[i].slice(1),{}));}
|
||||
element.$lsSkip=false;view.render(element);});};let events=event.trim().split(",");for(let y=0;y<events.length;y++){if(""===events[y]){continue;}
|
||||
switch(events[y].trim()){case"load":exec();break;case"none":break;case"click":case"change":case"keypress":case"keydown":case"keyup":case"input":case"submit":element.addEventListener(events[y],exec);break;default:document.addEventListener(events[y],exec);}}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-event",controller:function(element){var action=element.getAttribute("data-analytics-event")||"click";element.addEventListener(action,function(){var category=element.getAttribute("data-analytics-category")||"undefined";var label=element.getAttribute("data-analytics-label")||"undefined";if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
ga("send",{hitType:"event",eventCategory:category,eventAction:action,eventLabel:label});});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-pageview",controller:function(window,router,env){if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
var project=router.params["project"]||'None';ga("set","page",window.location.pathname);ga("set","dimension1",project);ga('set','dimension2',env.VERSION);ga('set','dimension3',env.SETUP);ga("send","pageview");}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-clone",controller:function(element,document,view){var template=element.innerHTML.toString();var label=element.dataset["label"]||"Add";var icon=element.dataset["icon"]||null;var target=element.dataset["target"]||null;var first=parseInt(element.dataset["first"]||1);var button=document.createElement("button");button.type="button";button.innerText=" "+label+" ";button.classList.add("margin-end");button.classList.add("margin-bottom-small");button.classList.add("reverse");if(icon){var iconElement=document.createElement("i");iconElement.className=icon;button.insertBefore(iconElement,button.firstChild);}
|
||||
switch(events[y].trim()){case"load":exec();break;case"none":break;case"click":case"change":case"keypress":case"keydown":case"keyup":case"input":case"submit":element.addEventListener(events[y],exec);break;default:document.addEventListener(events[y],exec);}}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics",controller:function(element){let action=element.getAttribute("data-analytics-event")||"click";let doNotTrack=window.navigator.doNotTrack;if(doNotTrack=='1'){return;}
|
||||
element.addEventListener(action,function(){let category=element.getAttribute("data-analytics-category")||"undefined";let label=element.getAttribute("data-analytics-label")||"undefined";if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
ga("send",{hitType:"event",eventCategory:category,eventAction:action,eventLabel:label});});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-activity",controller:function(window,element,appwrite,account){let action=element.getAttribute("data-analytics-event")||"click";let activity=element.getAttribute("data-analytics-label")||"None";let doNotTrack=window.navigator.doNotTrack;if(doNotTrack=='1'){return;}
|
||||
element.addEventListener(action,function(){let email=account?.email||element.elements['email'].value||'';appwrite.analytics.create(email,'console',activity,window.location.href)});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-pageview",controller:function(window,router,env){if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
let doNotTrack=window.navigator.doNotTrack;if(doNotTrack=='1'){return;}
|
||||
let project=router.params["project"]||'None';ga("set","page",window.location.pathname);ga("set","dimension1",project);ga('set','dimension2',env.VERSION);ga('set','dimension3',env.SETUP);ga("send","pageview");}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-clone",controller:function(element,document,view){var template=element.innerHTML.toString();var label=element.dataset["label"]||"Add";var icon=element.dataset["icon"]||null;var target=element.dataset["target"]||null;var first=parseInt(element.dataset["first"]||1);var button=document.createElement("button");button.type="button";button.innerText=" "+label+" ";button.classList.add("margin-end");button.classList.add("margin-bottom-small");button.classList.add("reverse");if(icon){var iconElement=document.createElement("i");iconElement.className=icon;button.insertBefore(iconElement,button.firstChild);}
|
||||
if(target){target=document.getElementById(target);}
|
||||
button.addEventListener("click",function(){var clone=document.createElement(element.tagName);if(element.name){clone.name=element.name;}
|
||||
clone.innerHTML=template;clone.className=element.className;view.render(clone);if(target){target.appendChild(clone);}else{button.parentNode.insertBefore(clone,button);}
|
||||
|
@ -2310,7 +2325,7 @@ code.innerHTML=value;Prism.highlightElement(code);div.scrollTop=0;};element.addE
|
|||
function syncA(){element.value=picker.value;update();}
|
||||
function syncB(){picker.value=element.value;}
|
||||
element.parentNode.insertBefore(preview,element);update();syncB();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-copy",controller:function(element,alerts,document,window){var button=window.document.createElement("i");button.type="button";button.className="icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);var copy=function(event){let disabled=element.disabled;element.disabled=false;element.focus();element.select();document.execCommand("Copy");if(document.selection){document.selection.empty();}else if(window.getSelection){window.getSelection().removeAllRanges();}
|
||||
element.disabled=disabled;element.blur();alerts.add({text:"Copied to clipboard",class:""},3000);};button.addEventListener("click",copy);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document",controller:function(element,container,search){var formsDocument=(element.dataset["formsDocument"]||'');var searchButton=(element.dataset["search"]||0);let path=container.scope(searchButton);element.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent(formsDocument,{bubbles:false,cancelable:true}));});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document-preview",controller:function(element,container,search){element.addEventListener('change',function(){console.log(element.value);});}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-forms-filter",controller:function(document,container,expression,element,form,di){let name=element.dataset["formsFilter"]||"";let events=element.dataset["event"]||"";let serialize=function(obj,prefix){let str=[],p;for(p in obj){if(obj.hasOwnProperty(p)){let k=prefix?prefix+"["+p+"]":p,v=obj[p];if(v===""){continue;}
|
||||
element.disabled=disabled;element.blur();alerts.add({text:"Copied to clipboard",class:""});};button.addEventListener("click",copy);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document",controller:function(element,container,search){var formsDocument=(element.dataset["formsDocument"]||'');var searchButton=(element.dataset["search"]||0);let path=container.scope(searchButton);element.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent(formsDocument,{bubbles:false,cancelable:true}));});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document-preview",controller:function(element,container,search){element.addEventListener('change',function(){console.log(element.value);});}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-forms-filter",controller:function(document,container,expression,element,form,di){let name=element.dataset["formsFilter"]||"";let events=element.dataset["event"]||"";let serialize=function(obj,prefix){let str=[],p;for(p in obj){if(obj.hasOwnProperty(p)){let k=prefix?prefix+"["+p+"]":p,v=obj[p];if(v===""){continue;}
|
||||
str.push(v!==null&&typeof v==="object"?serialize(v,k):encodeURIComponent(k)+"="+encodeURIComponent(v));}}
|
||||
return str.join("&");};let parse=function(filter){if(filter===""){return null;}
|
||||
let operatorsMap=["!=",">=","<=","=",">","<"];let operator=null;for(let key=0;key<operatorsMap.length;key++){if(filter.indexOf(operatorsMap[key])>-1){operator=operatorsMap[key];}}
|
||||
|
@ -2331,8 +2346,7 @@ score+=(variationCount-1)*10;return parseInt(score);};var callback=function(){va
|
|||
if(rtl.isRTL(content)){paragraph.style.direction='rtl';paragraph.style.textAlign='right';}
|
||||
else{paragraph.style.direction='ltr';paragraph.style.textAlign='left';}
|
||||
last=paragraph;}};var santize=function(e){clean(e);alignText(e);};element.addEventListener("change",function(){editor.content.innerHTML=markdown.render(element.value);alignText();});editor.content.setAttribute("placeholder",element.placeholder);editor.content.innerHTML=markdown.render(element.value);editor.content.tabIndex=0;alignText();editor.content.onkeydown=function preventTab(event){if(event.which===9){event.preventDefault();if(document.activeElement){var focussable=Array.prototype.filter.call(document.querySelectorAll('a:not([disabled]), button:not([disabled]), select:not([disabled]), input[type=text]:not([disabled]), input[type=checkbox]:not([disabled]), [tabindex]:not([disabled]):not([tabindex="-1"])'),function(element){return(element.offsetWidth>0||element.offsetHeight>0||element===document.activeElement);});var index=focussable.indexOf(document.activeElement);if(index>-1){if(event.shiftKey){var prevElement=focussable[index-1]||focussable[focussable.length-1];prevElement.focus();}else{var nextElement=focussable[index+1]||focussable[0];nextElement.focus();}}}}};div.addEventListener("paste",santize);div.addEventListener("drop",santize);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-remove",controller:function(element){Array.prototype.slice.call(element.querySelectorAll("[data-remove]")).map(function(obj){obj.addEventListener("click",function(){element.parentNode.removeChild(element);});});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-run",repeat:false,controller:function(element,expression,container){let action=expression.parse(element.dataset["formsRun"]||'');element.addEventListener('click',function(){return container.path(action)();});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-select-all",controller:function(element){let select=document.createElement("button");let unselect=document.createElement("button");select.textContent='Select All';unselect.textContent='Unselect All';select.classList.add('link');select.classList.add('margin-top-tiny');select.classList.add('margin-start-small');select.classList.add('text-size-small');select.classList.add('pull-end');unselect.classList.add('link');unselect.classList.add('margin-top-tiny');unselect.classList.add('margin-start-small');unselect.classList.add('text-size-small');unselect.classList.add('pull-end');select.type='button';unselect.type='button';element.parentNode.insertBefore(select,element);element.parentNode.insertBefore(unselect,element);select.addEventListener('click',function(){let checkboxes=element.querySelectorAll("input[type='checkbox']");for(var i=0;i<checkboxes.length;i++){checkboxes[i].checked=true;checkboxes[i].dispatchEvent(new Event('change'));}})
|
||||
unselect.addEventListener('click',function(){let checkboxes=element.querySelectorAll("input[type='checkbox']");for(var i=0;i<checkboxes.length;i++){checkboxes[i].checked=false;checkboxes[i].dispatchEvent(new Event('change'));}})}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-show-secret",controller:function(element,document){let button=document.createElement("a");button.type="button";button.className="icon-eye";button.innerHTML="show/hide";button.style.cursor="pointer";button.style.fontSize="10px";if(element.attributes.getNamedItem("data-forms-show-secret-above")){element.insertAdjacentElement("beforebegin",button);}else{element.parentNode.insertBefore(button,element.nextSibling);}
|
||||
const toggle=function(event){switch(element.type){case"password":element.type="text";break;case"text":element.type="password";break;default:console.warn("data-forms-show-secret: element.type NOT text NOR password");}};button.addEventListener("click",toggle);},});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-switch",controller:function(element){let input=window.document.createElement("input");input.type="checkbox";input.className="button switch";let syncA=function(){let value=input.checked?"true":"false"
|
||||
unselect.addEventListener('click',function(){let checkboxes=element.querySelectorAll("input[type='checkbox']");for(var i=0;i<checkboxes.length;i++){checkboxes[i].checked=false;checkboxes[i].dispatchEvent(new Event('change'));}})}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-show-secret",controller:function(element,document){let button=document.createElement('span');button.className="link pull-end text-size-small margin-top-negative icon-eye";button.innerHTML=(element.type=='password')?'Show Secret':'Hide Secret';button.style.visibility=(element.value=='')?'hidden':'visible';element.insertAdjacentElement("beforebegin",button);button.addEventListener("click",function(event){switch(element.type){case"password":element.type="text";button.innerHTML='Hide Secret';break;case"text":element.type="password";button.innerHTML='Show Secret';break;default:console.warn("data-forms-show-secret: element.type NOT text NOR password");}});let sync=function(event){button.style.visibility=(element.value=='')?'hidden':'visible';};element.addEventListener("keyup",sync);element.addEventListener("change",sync);},});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-switch",controller:function(element){let input=window.document.createElement("input");input.type="checkbox";input.className="button switch";let syncA=function(){let value=input.checked?"true":"false"
|
||||
let old=element.value;element.value=value;if(value!==old){element.dispatchEvent(new Event('change'));}};let syncB=function(){input.checked=(element.value==="true");};input.addEventListener("input",syncA);input.addEventListener("change",syncA);element.addEventListener("input",syncB);element.addEventListener("change",syncB);syncA();element.parentNode.insertBefore(input,element);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-tags",controller:function(element){let array=[];let tags=window.document.createElement("div");let preview=window.document.createElement("ul");let add=window.document.createElement("input");let listen=function(event){if((event.key==="Enter"||event.key===" "||event.key==="Tab")&&add.value.length>0){array.push(add.value);add.value="";element.value=JSON.stringify(array);check();if(event.key!=="Tab"){event.preventDefault();}}
|
||||
if((event.key==="Backspace"||event.key==="Delete")&&add.value===""){array.splice(-1,1);element.value=JSON.stringify(array);check();}
|
||||
return false;};let check=function(){try{array=JSON.parse(element.value)||[];}catch(error){array=[];}
|
||||
|
|
30
public/dist/scripts/app.js
vendored
30
public/dist/scripts/app.js
vendored
|
@ -129,7 +129,7 @@ paths=expression.getPaths();let prv=element.$lsSkip;element.$lsSkip=!result;if(!
|
|||
else{element.style.removeProperty('display');element.style.removeProperty('visibility');}
|
||||
if(prv===true&&element.$lsSkip===false){view.render(element)}};check();for(let i=0;i<paths.length;i++){let path=paths[i].split('.');while(path.length){container.bind(element,path.join('.'),check);path.pop();}}}});window.ls.container.get('view').add({selector:'data-ls-loop',template:false,nested:false,controller:function(element,view,container,window,expression){let expr=expression.parse(element.getAttribute('data-ls-loop'));let as=element.getAttribute('data-ls-as');let key=element.getAttribute('data-ls-key')||'$index';let limit=parseInt(expression.parse(element.getAttribute('data-limit')||'')||-1);let debug=element.getAttribute('data-debug')||false;let echo=function(){let array=container.path(expr);let counter=0;array=(!array)?[]:array;let watch=!!(array&&array.__proxy);while(element.hasChildNodes()){element.removeChild(element.lastChild);element.lastChild=null;}
|
||||
if(array instanceof Array&&typeof array!=='object'){throw new Error('Reference value must be array or object. '+(typeof array)+' given');}
|
||||
let children=[];element.$lsSkip=true;for(let prop in array){if(counter==limit){break;}
|
||||
let children=[];element.$lsSkip=true;element.style.visibility=(0===array.length&&element.style.visibility=='')?'hidden':'visible';for(let prop in array){if(counter==limit){break;}
|
||||
counter++;if(!array.hasOwnProperty(prop)){continue;}
|
||||
children[prop]=template.cloneNode(true);element.appendChild(children[prop]);(index=>{let context=expr+'.'+index;container.addNamespace(as,context);if(debug){console.info('debug-ls-loop','index',index);console.info('debug-ls-loop','context',context);console.info('debug-ls-loop','context-path',container.path(context).name);console.info('debug-ls-loop','namespaces',container.namespaces);}
|
||||
container.set(as,container.path(context),true,watch);container.set(key,index,true,false);view.render(children[prop]);container.removeNamespace(as);})(prop);}
|
||||
|
@ -140,7 +140,19 @@ return;}
|
|||
http.get(source).then(function(element){return function(data){element.innerHTML=data;view.render(element);element.dispatchEvent(new CustomEvent('template-loaded',{bubbles:true,cancelable:false}));}}(element),function(){throw new Error('Failed loading template');});};check(true);for(let i=0;i<paths.length;i++){let path=paths[i].split('.');while(path.length){container.bind(element,path.join('.'),check);path.pop();}}}});window.ls.error=function(){return function(error){window.console.error(error);if(window.location.pathname!=='/console'){window.location='/console';}};};window.addEventListener("error",function(event){console.error("ERROR-EVENT:",event.error.message,event.error.stack);});document.addEventListener("account.deleteSession",function(){window.location="/auth/signin";});document.addEventListener("account.create",function(){let container=window.ls.container;let form=container.get('serviceForm');let sdk=container.get('console');let promise=sdk.account.createSession(form.email,form.password);container.set("serviceForm",{},true,true);promise.then(function(){window.location='/console';},function(error){window.location='/auth/signup?failure=1';});});(function(window){"use strict";window.ls.container.set('alerts',function(window){return{list:[],ids:0,counter:0,max:5,add:function(message,time){var scope=this;message.id=scope.ids++;message.remove=function(){scope.remove(message.id);};scope.counter++;scope.list.unshift(message);if(scope.counter>scope.max){scope.list.pop();scope.counter--;}
|
||||
if(time>0){window.setTimeout(function(message){return function(){scope.remove(message.id)}}(message),time);}
|
||||
return message.id;},remove:function(id){let scope=this;for(let index=0;index<scope.list.length;index++){let obj=scope.list[index];if(obj.id===parseInt(id)){scope.counter--;if(typeof obj.callback==="function"){obj.callback();}
|
||||
scope.list.splice(index,1);};}}};},true,true);})(window);(function(window){"use strict";window.ls.container.set('console',function(window){var sdk=new window.Appwrite();sdk.setEndpoint(APP_ENV.API).setProject('console').setLocale(APP_ENV.LOCALE);return sdk;},true);})(window);(function(window){"use strict";window.ls.container.set('date',function(){function format(format,timestamp){var jsdate,f
|
||||
scope.list.splice(index,1);};}}};},true,true);})(window);(function(window){"use strict";window.ls.container.set('appwrite',function(window,env){let config={endpoint:'https://appwrite.io/v1',};let http=function(document,env){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(params.hasOwnProperty(p)){str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]));}}
|
||||
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
|
||||
if(typeof path!=='string'){throw new Error('var path must be of type string');}
|
||||
if(typeof headers!=='object'){throw new Error('var headers must be of type object');}
|
||||
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value);}
|
||||
for(let key in globalHeaders){if(globalHeaders.hasOwnProperty(key)){if(!headers[globalHeaders[key].key]){headers[globalHeaders[key].key]=globalHeaders[key].value;}}}
|
||||
if(method==='GET'){for(let param in params){if(param.hasOwnProperty(key)){path=addParam(path,key,params[key]);}}}
|
||||
switch(headers['content-type']){case'application/json':params=JSON.stringify(params);break;case'multipart/form-data':let formData=new FormData();for(let param in params){if(param.hasOwnProperty(key)){formData.append(key,param[key]);}}
|
||||
params=formData;break;}
|
||||
return new Promise(function(resolve,reject){let request=new XMLHttpRequest(),key;request.withCredentials=true;request.open(method,path,true);for(key in headers){if(headers.hasOwnProperty(key)){request.setRequestHeader(key,headers[key]);}}
|
||||
request.onload=function(){if(4===request.readyState&&399>=request.status){let data=request.response;let contentType=this.getResponseHeader('content-type');contentType=contentType.substring(0,contentType.indexOf(';'));switch(contentType){case'application/json':data=JSON.parse(data);break;}
|
||||
resolve(data);}else{reject(new Error(request.statusText));}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,false);}
|
||||
request.onerror=function(){reject(new Error("Network Error"));};request.send(params);})};return{'get':function(path,headers={},params={}){return call('GET',path+((params.length>0)?'?'+buildQuery(params):''),headers,{});},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress);},'put':function(path,headers={},params={},progress=null){return call('PUT',headers,params,progress);},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress);},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress);},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let analytics={create:function(id,source,activity,url){return http.post('/analytics',{'content-type':'application/json'},{id:id,source:source,activity:activity,url:url,version:env.VERSION,setup:env.SETUP});},};return{analytics:analytics,};},true);})(window);(function(window){"use strict";window.ls.container.set('console',function(window){var sdk=new window.Appwrite();sdk.setEndpoint(APP_ENV.API).setProject('console').setLocale(APP_ENV.LOCALE);return sdk;},true);})(window);(function(window){"use strict";window.ls.container.set('date',function(){function format(format,timestamp){var jsdate,f
|
||||
var txtWords=['Sun','Mon','Tues','Wednes','Thurs','Fri','Satur','January','February','March','April','May','June','July','August','September','October','November','December']
|
||||
var formatChr=/\\?(.?)/gi
|
||||
var formatChrCb=function(t,s){return f[t]?f[t]():s}
|
||||
|
@ -336,9 +348,12 @@ running=false;element.style.backgroud='transparent';element.classList.add("load-
|
|||
parsedFailure[i].charAt(0).toUpperCase()+
|
||||
parsedFailure[i].slice(1),{}));}
|
||||
element.$lsSkip=false;view.render(element);});};let events=event.trim().split(",");for(let y=0;y<events.length;y++){if(""===events[y]){continue;}
|
||||
switch(events[y].trim()){case"load":exec();break;case"none":break;case"click":case"change":case"keypress":case"keydown":case"keyup":case"input":case"submit":element.addEventListener(events[y],exec);break;default:document.addEventListener(events[y],exec);}}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-event",controller:function(element){var action=element.getAttribute("data-analytics-event")||"click";element.addEventListener(action,function(){var category=element.getAttribute("data-analytics-category")||"undefined";var label=element.getAttribute("data-analytics-label")||"undefined";if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
ga("send",{hitType:"event",eventCategory:category,eventAction:action,eventLabel:label});});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-pageview",controller:function(window,router,env){if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
var project=router.params["project"]||'None';ga("set","page",window.location.pathname);ga("set","dimension1",project);ga('set','dimension2',env.VERSION);ga('set','dimension3',env.SETUP);ga("send","pageview");}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-clone",controller:function(element,document,view){var template=element.innerHTML.toString();var label=element.dataset["label"]||"Add";var icon=element.dataset["icon"]||null;var target=element.dataset["target"]||null;var first=parseInt(element.dataset["first"]||1);var button=document.createElement("button");button.type="button";button.innerText=" "+label+" ";button.classList.add("margin-end");button.classList.add("margin-bottom-small");button.classList.add("reverse");if(icon){var iconElement=document.createElement("i");iconElement.className=icon;button.insertBefore(iconElement,button.firstChild);}
|
||||
switch(events[y].trim()){case"load":exec();break;case"none":break;case"click":case"change":case"keypress":case"keydown":case"keyup":case"input":case"submit":element.addEventListener(events[y],exec);break;default:document.addEventListener(events[y],exec);}}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics",controller:function(element){let action=element.getAttribute("data-analytics-event")||"click";let doNotTrack=window.navigator.doNotTrack;if(doNotTrack=='1'){return;}
|
||||
element.addEventListener(action,function(){let category=element.getAttribute("data-analytics-category")||"undefined";let label=element.getAttribute("data-analytics-label")||"undefined";if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
ga("send",{hitType:"event",eventCategory:category,eventAction:action,eventLabel:label});});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-activity",controller:function(window,element,appwrite,account){let action=element.getAttribute("data-analytics-event")||"click";let activity=element.getAttribute("data-analytics-label")||"None";let doNotTrack=window.navigator.doNotTrack;if(doNotTrack=='1'){return;}
|
||||
element.addEventListener(action,function(){let email=account?.email||element.elements['email'].value||'';appwrite.analytics.create(email,'console',activity,window.location.href)});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-analytics-pageview",controller:function(window,router,env){if(!ga){console.error("Google Analytics ga object is not available");}
|
||||
let doNotTrack=window.navigator.doNotTrack;if(doNotTrack=='1'){return;}
|
||||
let project=router.params["project"]||'None';ga("set","page",window.location.pathname);ga("set","dimension1",project);ga('set','dimension2',env.VERSION);ga('set','dimension3',env.SETUP);ga("send","pageview");}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-clone",controller:function(element,document,view){var template=element.innerHTML.toString();var label=element.dataset["label"]||"Add";var icon=element.dataset["icon"]||null;var target=element.dataset["target"]||null;var first=parseInt(element.dataset["first"]||1);var button=document.createElement("button");button.type="button";button.innerText=" "+label+" ";button.classList.add("margin-end");button.classList.add("margin-bottom-small");button.classList.add("reverse");if(icon){var iconElement=document.createElement("i");iconElement.className=icon;button.insertBefore(iconElement,button.firstChild);}
|
||||
if(target){target=document.getElementById(target);}
|
||||
button.addEventListener("click",function(){var clone=document.createElement(element.tagName);if(element.name){clone.name=element.name;}
|
||||
clone.innerHTML=template;clone.className=element.className;view.render(clone);if(target){target.appendChild(clone);}else{button.parentNode.insertBefore(clone,button);}
|
||||
|
@ -355,7 +370,7 @@ code.innerHTML=value;Prism.highlightElement(code);div.scrollTop=0;};element.addE
|
|||
function syncA(){element.value=picker.value;update();}
|
||||
function syncB(){picker.value=element.value;}
|
||||
element.parentNode.insertBefore(preview,element);update();syncB();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-copy",controller:function(element,alerts,document,window){var button=window.document.createElement("i");button.type="button";button.className="icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);var copy=function(event){let disabled=element.disabled;element.disabled=false;element.focus();element.select();document.execCommand("Copy");if(document.selection){document.selection.empty();}else if(window.getSelection){window.getSelection().removeAllRanges();}
|
||||
element.disabled=disabled;element.blur();alerts.add({text:"Copied to clipboard",class:""},3000);};button.addEventListener("click",copy);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document",controller:function(element,container,search){var formsDocument=(element.dataset["formsDocument"]||'');var searchButton=(element.dataset["search"]||0);let path=container.scope(searchButton);element.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent(formsDocument,{bubbles:false,cancelable:true}));});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document-preview",controller:function(element,container,search){element.addEventListener('change',function(){console.log(element.value);});}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-forms-filter",controller:function(document,container,expression,element,form,di){let name=element.dataset["formsFilter"]||"";let events=element.dataset["event"]||"";let serialize=function(obj,prefix){let str=[],p;for(p in obj){if(obj.hasOwnProperty(p)){let k=prefix?prefix+"["+p+"]":p,v=obj[p];if(v===""){continue;}
|
||||
element.disabled=disabled;element.blur();alerts.add({text:"Copied to clipboard",class:""});};button.addEventListener("click",copy);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document",controller:function(element,container,search){var formsDocument=(element.dataset["formsDocument"]||'');var searchButton=(element.dataset["search"]||0);let path=container.scope(searchButton);element.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent(formsDocument,{bubbles:false,cancelable:true}));});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-document-preview",controller:function(element,container,search){element.addEventListener('change',function(){console.log(element.value);});}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-forms-filter",controller:function(document,container,expression,element,form,di){let name=element.dataset["formsFilter"]||"";let events=element.dataset["event"]||"";let serialize=function(obj,prefix){let str=[],p;for(p in obj){if(obj.hasOwnProperty(p)){let k=prefix?prefix+"["+p+"]":p,v=obj[p];if(v===""){continue;}
|
||||
str.push(v!==null&&typeof v==="object"?serialize(v,k):encodeURIComponent(k)+"="+encodeURIComponent(v));}}
|
||||
return str.join("&");};let parse=function(filter){if(filter===""){return null;}
|
||||
let operatorsMap=["!=",">=","<=","=",">","<"];let operator=null;for(let key=0;key<operatorsMap.length;key++){if(filter.indexOf(operatorsMap[key])>-1){operator=operatorsMap[key];}}
|
||||
|
@ -376,8 +391,7 @@ score+=(variationCount-1)*10;return parseInt(score);};var callback=function(){va
|
|||
if(rtl.isRTL(content)){paragraph.style.direction='rtl';paragraph.style.textAlign='right';}
|
||||
else{paragraph.style.direction='ltr';paragraph.style.textAlign='left';}
|
||||
last=paragraph;}};var santize=function(e){clean(e);alignText(e);};element.addEventListener("change",function(){editor.content.innerHTML=markdown.render(element.value);alignText();});editor.content.setAttribute("placeholder",element.placeholder);editor.content.innerHTML=markdown.render(element.value);editor.content.tabIndex=0;alignText();editor.content.onkeydown=function preventTab(event){if(event.which===9){event.preventDefault();if(document.activeElement){var focussable=Array.prototype.filter.call(document.querySelectorAll('a:not([disabled]), button:not([disabled]), select:not([disabled]), input[type=text]:not([disabled]), input[type=checkbox]:not([disabled]), [tabindex]:not([disabled]):not([tabindex="-1"])'),function(element){return(element.offsetWidth>0||element.offsetHeight>0||element===document.activeElement);});var index=focussable.indexOf(document.activeElement);if(index>-1){if(event.shiftKey){var prevElement=focussable[index-1]||focussable[focussable.length-1];prevElement.focus();}else{var nextElement=focussable[index+1]||focussable[0];nextElement.focus();}}}}};div.addEventListener("paste",santize);div.addEventListener("drop",santize);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-remove",controller:function(element){Array.prototype.slice.call(element.querySelectorAll("[data-remove]")).map(function(obj){obj.addEventListener("click",function(){element.parentNode.removeChild(element);});});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-run",repeat:false,controller:function(element,expression,container){let action=expression.parse(element.dataset["formsRun"]||'');element.addEventListener('click',function(){return container.path(action)();});}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-select-all",controller:function(element){let select=document.createElement("button");let unselect=document.createElement("button");select.textContent='Select All';unselect.textContent='Unselect All';select.classList.add('link');select.classList.add('margin-top-tiny');select.classList.add('margin-start-small');select.classList.add('text-size-small');select.classList.add('pull-end');unselect.classList.add('link');unselect.classList.add('margin-top-tiny');unselect.classList.add('margin-start-small');unselect.classList.add('text-size-small');unselect.classList.add('pull-end');select.type='button';unselect.type='button';element.parentNode.insertBefore(select,element);element.parentNode.insertBefore(unselect,element);select.addEventListener('click',function(){let checkboxes=element.querySelectorAll("input[type='checkbox']");for(var i=0;i<checkboxes.length;i++){checkboxes[i].checked=true;checkboxes[i].dispatchEvent(new Event('change'));}})
|
||||
unselect.addEventListener('click',function(){let checkboxes=element.querySelectorAll("input[type='checkbox']");for(var i=0;i<checkboxes.length;i++){checkboxes[i].checked=false;checkboxes[i].dispatchEvent(new Event('change'));}})}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-show-secret",controller:function(element,document){let button=document.createElement("a");button.type="button";button.className="icon-eye";button.innerHTML="show/hide";button.style.cursor="pointer";button.style.fontSize="10px";if(element.attributes.getNamedItem("data-forms-show-secret-above")){element.insertAdjacentElement("beforebegin",button);}else{element.parentNode.insertBefore(button,element.nextSibling);}
|
||||
const toggle=function(event){switch(element.type){case"password":element.type="text";break;case"text":element.type="password";break;default:console.warn("data-forms-show-secret: element.type NOT text NOR password");}};button.addEventListener("click",toggle);},});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-switch",controller:function(element){let input=window.document.createElement("input");input.type="checkbox";input.className="button switch";let syncA=function(){let value=input.checked?"true":"false"
|
||||
unselect.addEventListener('click',function(){let checkboxes=element.querySelectorAll("input[type='checkbox']");for(var i=0;i<checkboxes.length;i++){checkboxes[i].checked=false;checkboxes[i].dispatchEvent(new Event('change'));}})}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-show-secret",controller:function(element,document){let button=document.createElement('span');button.className="link pull-end text-size-small margin-top-negative icon-eye";button.innerHTML=(element.type=='password')?'Show Secret':'Hide Secret';button.style.visibility=(element.value=='')?'hidden':'visible';element.insertAdjacentElement("beforebegin",button);button.addEventListener("click",function(event){switch(element.type){case"password":element.type="text";button.innerHTML='Hide Secret';break;case"text":element.type="password";button.innerHTML='Show Secret';break;default:console.warn("data-forms-show-secret: element.type NOT text NOR password");}});let sync=function(event){button.style.visibility=(element.value=='')?'hidden':'visible';};element.addEventListener("keyup",sync);element.addEventListener("change",sync);},});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-switch",controller:function(element){let input=window.document.createElement("input");input.type="checkbox";input.className="button switch";let syncA=function(){let value=input.checked?"true":"false"
|
||||
let old=element.value;element.value=value;if(value!==old){element.dispatchEvent(new Event('change'));}};let syncB=function(){input.checked=(element.value==="true");};input.addEventListener("input",syncA);input.addEventListener("change",syncA);element.addEventListener("input",syncB);element.addEventListener("change",syncB);syncA();element.parentNode.insertBefore(input,element);}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-tags",controller:function(element){let array=[];let tags=window.document.createElement("div");let preview=window.document.createElement("ul");let add=window.document.createElement("input");let listen=function(event){if((event.key==="Enter"||event.key===" "||event.key==="Tab")&&add.value.length>0){array.push(add.value);add.value="";element.value=JSON.stringify(array);check();if(event.key!=="Tab"){event.preventDefault();}}
|
||||
if((event.key==="Backspace"||event.key==="Delete")&&add.value===""){array.splice(-1,1);element.value=JSON.stringify(array);check();}
|
||||
return false;};let check=function(){try{array=JSON.parse(element.value)||[];}catch(error){array=[];}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* “Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
|
||||
* and the Universe trying to produce bigger and better idiots.
|
||||
* So far, the Universe is winning.”
|
||||
*
|
||||
* ― Rick Cook, The Wizardry Compiled
|
||||
*/
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
use Utopia\App;
|
||||
use Utopia\Request;
|
||||
|
||||
error_reporting(0);
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
//trigger_error('hide errors in prod', E_USER_NOTICE);
|
||||
|
||||
include __DIR__ . '/../app/controllers/general.php';
|
||||
|
||||
$app = new App('America/New_York');
|
||||
|
||||
$app->run(new Request(), new Response());
|
|
@ -129,7 +129,7 @@ paths=expression.getPaths();let prv=element.$lsSkip;element.$lsSkip=!result;if(!
|
|||
else{element.style.removeProperty('display');element.style.removeProperty('visibility');}
|
||||
if(prv===true&&element.$lsSkip===false){view.render(element)}};check();for(let i=0;i<paths.length;i++){let path=paths[i].split('.');while(path.length){container.bind(element,path.join('.'),check);path.pop();}}}});window.ls.container.get('view').add({selector:'data-ls-loop',template:false,nested:false,controller:function(element,view,container,window,expression){let expr=expression.parse(element.getAttribute('data-ls-loop'));let as=element.getAttribute('data-ls-as');let key=element.getAttribute('data-ls-key')||'$index';let limit=parseInt(expression.parse(element.getAttribute('data-limit')||'')||-1);let debug=element.getAttribute('data-debug')||false;let echo=function(){let array=container.path(expr);let counter=0;array=(!array)?[]:array;let watch=!!(array&&array.__proxy);while(element.hasChildNodes()){element.removeChild(element.lastChild);element.lastChild=null;}
|
||||
if(array instanceof Array&&typeof array!=='object'){throw new Error('Reference value must be array or object. '+(typeof array)+' given');}
|
||||
let children=[];element.$lsSkip=true;for(let prop in array){if(counter==limit){break;}
|
||||
let children=[];element.$lsSkip=true;element.style.visibility=(0===array.length&&element.style.visibility=='')?'hidden':'visible';for(let prop in array){if(counter==limit){break;}
|
||||
counter++;if(!array.hasOwnProperty(prop)){continue;}
|
||||
children[prop]=template.cloneNode(true);element.appendChild(children[prop]);(index=>{let context=expr+'.'+index;container.addNamespace(as,context);if(debug){console.info('debug-ls-loop','index',index);console.info('debug-ls-loop','context',context);console.info('debug-ls-loop','context-path',container.path(context).name);console.info('debug-ls-loop','namespaces',container.namespaces);}
|
||||
container.set(as,container.path(context),true,watch);container.set(key,index,true,false);view.render(children[prop]);container.removeNamespace(as);})(prop);}
|
||||
|
|
201
public/scripts/services/api.js
Normal file
201
public/scripts/services/api.js
Normal file
|
@ -0,0 +1,201 @@
|
|||
(function (window) {
|
||||
"use strict";
|
||||
|
||||
window.ls.container.set('appwrite', function (window, env) {
|
||||
let config = {
|
||||
endpoint: 'https://appwrite.io/v1',
|
||||
};
|
||||
|
||||
let http = function (document, env) {
|
||||
let globalParams = [],
|
||||
globalHeaders = [];
|
||||
|
||||
let addParam = function (url, param, value) {
|
||||
let a = document.createElement('a'), regex = /(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;
|
||||
let match, str = [];
|
||||
a.href = url;
|
||||
param = encodeURIComponent(param);
|
||||
|
||||
while (match = regex.exec(a.search)) if (param !== match[1]) str.push(match[1] + (match[2] ? "=" + match[2] : ""));
|
||||
|
||||
str.push(param + (value ? "=" + encodeURIComponent(value) : ""));
|
||||
|
||||
a.search = str.join("&");
|
||||
|
||||
return a.href;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} params
|
||||
* @returns {string}
|
||||
*/
|
||||
let buildQuery = function (params) {
|
||||
let str = [];
|
||||
|
||||
for (let p in params) {
|
||||
if (params.hasOwnProperty(p)) {
|
||||
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(params[p]));
|
||||
}
|
||||
}
|
||||
|
||||
return str.join("&");
|
||||
};
|
||||
|
||||
let addGlobalHeader = function (key, value) {
|
||||
globalHeaders[key] = { key: key.toLowerCase(), value: value.toLowerCase() };
|
||||
};
|
||||
|
||||
let addGlobalParam = function (key, value) {
|
||||
globalParams.push({ key: key, value: value });
|
||||
};
|
||||
|
||||
addGlobalHeader('content-type', '');
|
||||
|
||||
/**
|
||||
* @param {string} method
|
||||
* @param {string} path string
|
||||
* @param {Object} headers
|
||||
* @param {Object} params
|
||||
* @param {function} progress
|
||||
* @returns {Promise}
|
||||
*/
|
||||
let call = function (method, path, headers = {}, params = {}, progress = null) {
|
||||
let i;
|
||||
|
||||
path = config.endpoint + path;
|
||||
|
||||
if (-1 === ['GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'HEAD', 'OPTIONS', 'CONNECT', 'PATCH'].indexOf(method)) {
|
||||
throw new Error('var method must contain a valid HTTP method name');
|
||||
}
|
||||
|
||||
if (typeof path !== 'string') {
|
||||
throw new Error('var path must be of type string');
|
||||
}
|
||||
|
||||
if (typeof headers !== 'object') {
|
||||
throw new Error('var headers must be of type object');
|
||||
}
|
||||
|
||||
for (i = 0; i < globalParams.length; i++) { // Add global params to URL
|
||||
path = addParam(path, globalParams[i].key, globalParams[i].value);
|
||||
}
|
||||
|
||||
for (let key in globalHeaders) { // Add Global Headers
|
||||
if (globalHeaders.hasOwnProperty(key)) {
|
||||
if (!headers[globalHeaders[key].key]) {
|
||||
headers[globalHeaders[key].key] = globalHeaders[key].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (method === 'GET') {
|
||||
for (let param in params) {
|
||||
if (param.hasOwnProperty(key)) {
|
||||
path = addParam(path, key, params[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (headers['content-type']) { // Parse request by content type
|
||||
case 'application/json':
|
||||
params = JSON.stringify(params);
|
||||
break;
|
||||
|
||||
case 'multipart/form-data':
|
||||
let formData = new FormData();
|
||||
for (let param in params) {
|
||||
if (param.hasOwnProperty(key)) {
|
||||
formData.append(key, param[key]);
|
||||
}
|
||||
}
|
||||
|
||||
params = formData;
|
||||
break;
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
let request = new XMLHttpRequest(), key;
|
||||
|
||||
request.withCredentials = true;
|
||||
request.open(method, path, true);
|
||||
|
||||
for (key in headers) { // Set Headers
|
||||
if (headers.hasOwnProperty(key)) {
|
||||
request.setRequestHeader(key, headers[key]);
|
||||
}
|
||||
}
|
||||
|
||||
request.onload = function () {
|
||||
if (4 === request.readyState && 399 >= request.status) {
|
||||
let data = request.response;
|
||||
let contentType = this.getResponseHeader('content-type');
|
||||
contentType = contentType.substring(0, contentType.indexOf(';'));
|
||||
|
||||
switch (contentType) {
|
||||
case 'application/json':
|
||||
data = JSON.parse(data);
|
||||
break;
|
||||
}
|
||||
|
||||
resolve(data);
|
||||
|
||||
} else {
|
||||
reject(new Error(request.statusText));
|
||||
}
|
||||
};
|
||||
|
||||
if (progress) {
|
||||
request.addEventListener('progress', progress);
|
||||
request.upload.addEventListener('progress', progress, false);
|
||||
}
|
||||
|
||||
// Handle network errors
|
||||
request.onerror = function () {
|
||||
reject(new Error("Network Error"));
|
||||
};
|
||||
|
||||
request.send(params);
|
||||
})
|
||||
};
|
||||
|
||||
return {
|
||||
'get': function (path, headers = {}, params = {}) {
|
||||
return call('GET', path + ((params.length > 0) ? '?' + buildQuery(params) : ''), headers, {});
|
||||
},
|
||||
'post': function (path, headers = {}, params = {}, progress = null) {
|
||||
return call('POST', path, headers, params, progress);
|
||||
},
|
||||
'put': function (path, headers = {}, params = {}, progress = null) {
|
||||
return call('PUT', headers, params, progress);
|
||||
},
|
||||
'patch': function (path, headers = {}, params = {}, progress = null) {
|
||||
return call('PATCH', path, headers, params, progress);
|
||||
},
|
||||
'delete': function (path, headers = {}, params = {}, progress = null) {
|
||||
return call('DELETE', path, headers, params, progress);
|
||||
},
|
||||
'addGlobalParam': addGlobalParam,
|
||||
'addGlobalHeader': addGlobalHeader
|
||||
}
|
||||
}(window.document);
|
||||
|
||||
let analytics = {
|
||||
create: function (id, source, activity, url) {
|
||||
return http.post('/analytics', { 'content-type': 'application/json' }, {
|
||||
id: id,
|
||||
source: source,
|
||||
activity: activity,
|
||||
url: url,
|
||||
version: env.VERSION,
|
||||
setup: env.SETUP
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
return {
|
||||
analytics: analytics,
|
||||
};
|
||||
}, true);
|
||||
|
||||
})(window);
|
22
public/scripts/views/analytics/activity.js
Normal file
22
public/scripts/views/analytics/activity.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
(function(window) {
|
||||
"use strict";
|
||||
|
||||
window.ls.container.get("view").add({
|
||||
selector: "data-analytics-activity",
|
||||
controller: function(window, element, appwrite, account) {
|
||||
let action = element.getAttribute("data-analytics-event") || "click";
|
||||
let activity = element.getAttribute("data-analytics-label") || "None";
|
||||
let doNotTrack = window.navigator.doNotTrack;
|
||||
|
||||
if(doNotTrack == '1') {
|
||||
return;
|
||||
}
|
||||
|
||||
element.addEventListener(action, function() {
|
||||
let email = account?.email || element.elements['email'].value || '';
|
||||
|
||||
appwrite.analytics.create(email, 'console', activity, window.location.href)
|
||||
});
|
||||
}
|
||||
});
|
||||
})(window);
|
|
@ -2,14 +2,19 @@
|
|||
"use strict";
|
||||
|
||||
window.ls.container.get("view").add({
|
||||
selector: "data-analytics-event",
|
||||
selector: "data-analytics",
|
||||
controller: function(element) {
|
||||
var action = element.getAttribute("data-analytics-event") || "click";
|
||||
let action = element.getAttribute("data-analytics-event") || "click";
|
||||
let doNotTrack = window.navigator.doNotTrack;
|
||||
|
||||
if(doNotTrack == '1') {
|
||||
return;
|
||||
}
|
||||
|
||||
element.addEventListener(action, function() {
|
||||
var category =
|
||||
let category =
|
||||
element.getAttribute("data-analytics-category") || "undefined";
|
||||
var label = element.getAttribute("data-analytics-label") || "undefined";
|
||||
let label = element.getAttribute("data-analytics-label") || "undefined";
|
||||
|
||||
if (!ga) {
|
||||
console.error("Google Analytics ga object is not available");
|
||||
|
|
|
@ -7,8 +7,14 @@
|
|||
if (!ga) {
|
||||
console.error("Google Analytics ga object is not available");
|
||||
}
|
||||
|
||||
let doNotTrack = window.navigator.doNotTrack;
|
||||
|
||||
var project = router.params["project"] || 'None';
|
||||
if(doNotTrack == '1') {
|
||||
return;
|
||||
}
|
||||
|
||||
let project = router.params["project"] || 'None';
|
||||
|
||||
ga("set", "page", window.location.pathname);
|
||||
|
||||
|
|
|
@ -4,35 +4,36 @@
|
|||
window.ls.container.get("view").add({
|
||||
selector: "data-forms-show-secret",
|
||||
controller: function (element, document) {
|
||||
let button = document.createElement("a");
|
||||
button.type = "button";
|
||||
button.className = "icon-eye";
|
||||
button.innerHTML = "show/hide";
|
||||
button.style.cursor = "pointer";
|
||||
button.style.fontSize = "10px";
|
||||
let button = document.createElement('span');
|
||||
button.className = "link pull-end text-size-small margin-top-negative icon-eye";
|
||||
button.innerHTML = (element.type == 'password') ? 'Show Secret' : 'Hide Secret';
|
||||
button.style.visibility = (element.value == '') ? 'hidden' : 'visible';
|
||||
|
||||
if (element.attributes.getNamedItem("data-forms-show-secret-above")) {
|
||||
element.insertAdjacentElement("beforebegin", button);
|
||||
} else {
|
||||
element.parentNode.insertBefore(button, element.nextSibling);
|
||||
}
|
||||
element.insertAdjacentElement("beforebegin", button);
|
||||
|
||||
const toggle = function (event) {
|
||||
button.addEventListener("click", function (event) {
|
||||
switch (element.type) {
|
||||
case "password":
|
||||
element.type = "text";
|
||||
button.innerHTML = 'Hide Secret';
|
||||
break;
|
||||
case "text":
|
||||
element.type = "password";
|
||||
button.innerHTML = 'Show Secret';
|
||||
break;
|
||||
default:
|
||||
console.warn(
|
||||
"data-forms-show-secret: element.type NOT text NOR password"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
let sync = function(event) {
|
||||
button.style.visibility = (element.value == '') ? 'hidden' : 'visible';
|
||||
};
|
||||
|
||||
button.addEventListener("click", toggle);
|
||||
element.addEventListener("keyup", sync);
|
||||
element.addEventListener("change", sync);
|
||||
},
|
||||
});
|
||||
})(window);
|
||||
|
|
|
@ -218,7 +218,7 @@ class OpenAPI3 extends Format
|
|||
$node['schema']['x-example'] = '{}';
|
||||
//$node['schema']['format'] = 'json';
|
||||
break;
|
||||
case 'Appwrite\Storage\Validator\File':
|
||||
case 'Utopia\Storage\Validator\File':
|
||||
$consumes = ['multipart/form-data'];
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['format'] = 'binary';
|
||||
|
|
|
@ -210,7 +210,7 @@ class Swagger2 extends Format
|
|||
$node['x-example'] = '{}';
|
||||
//$node['format'] = 'json';
|
||||
break;
|
||||
case 'Appwrite\Storage\Validator\File':
|
||||
case 'Utopia\Storage\Validator\File':
|
||||
$consumes = ['multipart/form-data'];
|
||||
$node['type'] = 'file';
|
||||
break;
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Compression\Algorithms;
|
||||
|
||||
use Appwrite\Storage\Compression\Compression;
|
||||
|
||||
class GZIP extends Compression
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'gzip';
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress.
|
||||
*
|
||||
* We use gzencode over gzcompress for better support of the first format among other tools.
|
||||
* (http://stackoverflow.com/a/621987/2299554)
|
||||
*
|
||||
* @see http://php.net/manual/en/function.gzencode.php
|
||||
*
|
||||
* @param string $data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function compress(string $data):string
|
||||
{
|
||||
return \gzencode($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress.
|
||||
*
|
||||
* @param string $data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function decompress(string $data):string
|
||||
{
|
||||
return \gzdecode($data);
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Compression;
|
||||
|
||||
abstract class Compression
|
||||
{
|
||||
/**
|
||||
* Return the name of compression algorithm.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getName(): string;
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function compress(string $data);
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function decompress(string $data);
|
||||
}
|
|
@ -1,167 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage;
|
||||
|
||||
use Exception;
|
||||
|
||||
abstract class Device
|
||||
{
|
||||
/**
|
||||
* Get Name.
|
||||
*
|
||||
* Get storage device name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getName(): string;
|
||||
|
||||
/**
|
||||
* Get Description.
|
||||
*
|
||||
* Get storage device description and purpose.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getDescription(): string;
|
||||
|
||||
/**
|
||||
* Get Root.
|
||||
*
|
||||
* Get storage device root path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getRoot(): string;
|
||||
|
||||
/**
|
||||
* Get Path.
|
||||
*
|
||||
* Each device hold a complex directory structure that is being build in this method.
|
||||
*
|
||||
* @param $filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getPath($filename): string;
|
||||
|
||||
/**
|
||||
* Upload.
|
||||
*
|
||||
* Upload a file to desired destination in the selected disk, return true on success and false on failure.
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $path
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function upload($source, $path): bool;
|
||||
|
||||
/**
|
||||
* Read file by given path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function read(string $path): string;
|
||||
|
||||
/**
|
||||
* Write file by given path.
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $data
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function write(string $path, string $data): bool;
|
||||
|
||||
/**
|
||||
* Move file from given source to given path, return true on success and false on failure.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $target
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function move(string $source, string $target): bool;
|
||||
|
||||
/**
|
||||
* Delete file in given path return true on success and false on failure.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param string $path
|
||||
* @param bool $recursive
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function delete(string $path, bool $recursive = false): bool;
|
||||
|
||||
/**
|
||||
* Returns given file path its size.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
abstract public function getFileSize(string $path): int;
|
||||
|
||||
/**
|
||||
* Returns given file path its mime type.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.mime-content-type.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getFileMimeType(string $path): string;
|
||||
|
||||
/**
|
||||
* Returns given file path its MD5 hash value.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.md5-file.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getFileHash(string $path): string;
|
||||
|
||||
/**
|
||||
* Get directory size in bytes.
|
||||
*
|
||||
* Return -1 on error
|
||||
*
|
||||
* Based on http://www.jonasjohn.de/snippets/php/dir-size.htm
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
abstract public function getDirectorySize(string $path): int;
|
||||
|
||||
/**
|
||||
* Get Partition Free Space.
|
||||
*
|
||||
* disk_free_space — Returns available space on filesystem or disk partition
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
abstract public function getPartitionFreeSpace(): float;
|
||||
|
||||
/**
|
||||
* Get Partition Total Space.
|
||||
*
|
||||
* disk_total_space — Returns the total size of a filesystem or disk partition
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
abstract public function getPartitionTotalSpace(): float;
|
||||
}
|
|
@ -1,280 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Device;
|
||||
|
||||
use Exception;
|
||||
use Appwrite\Storage\Device;
|
||||
|
||||
class Local extends Device
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $root = 'temp';
|
||||
|
||||
/**
|
||||
* Local constructor.
|
||||
*
|
||||
* @param string $root
|
||||
*/
|
||||
public function __construct($root = '')
|
||||
{
|
||||
$this->root = $root;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName():string
|
||||
{
|
||||
return 'Local Storage';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription():string
|
||||
{
|
||||
return 'Adapter for Local storage that is in the physical or virtual machine or mounted to it.';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRoot():string
|
||||
{
|
||||
return $this->root;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath($filename):string
|
||||
{
|
||||
$path = '';
|
||||
|
||||
for ($i = 0; $i < 4; ++$i) {
|
||||
$path = ($i < \strlen($filename)) ? $path.DIRECTORY_SEPARATOR.$filename[$i] : $path.DIRECTORY_SEPARATOR.'x';
|
||||
}
|
||||
|
||||
return $this->getRoot().$path.DIRECTORY_SEPARATOR.$filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload.
|
||||
*
|
||||
* Upload a file to desired destination in the selected disk.
|
||||
*
|
||||
* @param string $target
|
||||
* @param string $filename
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function upload($source, $path):bool
|
||||
{
|
||||
if (!\file_exists(\dirname($path))) { // Checks if directory path to file exists
|
||||
if (!@\mkdir(\dirname($path), 0755, true)) {
|
||||
throw new Exception('Can\'t create directory: '.\dirname($path));
|
||||
}
|
||||
}
|
||||
|
||||
if (\move_uploaded_file($source, $path)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read file by given path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function read(string $path):string
|
||||
{
|
||||
return \file_get_contents($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write file by given path.
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $data
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function write(string $path, string $data): bool
|
||||
{
|
||||
if (!\file_exists(\dirname($path))) { // Checks if directory path to file exists
|
||||
if (!@\mkdir(\dirname($path), 0755, true)) {
|
||||
throw new Exception('Can\'t create directory '.\dirname($path));
|
||||
}
|
||||
}
|
||||
|
||||
return (bool)\file_put_contents($path, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move file from given source to given path, Return true on success and false on failure.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $target
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function move(string $source, string $target):bool
|
||||
{
|
||||
if (!\file_exists(\dirname($target))) { // Checks if directory path to file exists
|
||||
if (!@\mkdir(\dirname($target), 0755, true)) {
|
||||
throw new Exception('Can\'t create directory '.\dirname($target));
|
||||
}
|
||||
}
|
||||
|
||||
if (\rename($source, $target)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete file in given path, Return true on success and false on failure.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param string $path
|
||||
* @param bool $recursive
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete(string $path, bool $recursive = false):bool
|
||||
{
|
||||
if (\is_dir($path) && $recursive) {
|
||||
$files = \glob($path.'*', GLOB_MARK); // GLOB_MARK adds a slash to directories returned
|
||||
|
||||
foreach ($files as $file) {
|
||||
$this->delete($file, true);
|
||||
}
|
||||
|
||||
\rmdir($path);
|
||||
} elseif (\is_file($path)) {
|
||||
return \unlink($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns given file path its size.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getFileSize(string $path):int
|
||||
{
|
||||
return \filesize($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns given file path its mime type.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.mime-content-type.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFileMimeType(string $path):string
|
||||
{
|
||||
return \mime_content_type($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns given file path its MD5 hash value.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.md5-file.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFileHash(string $path):string
|
||||
{
|
||||
return \md5_file($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get directory size in bytes.
|
||||
*
|
||||
* Return -1 on error
|
||||
*
|
||||
* Based on http://www.jonasjohn.de/snippets/php/dir-size.htm
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDirectorySize(string $path):int
|
||||
{
|
||||
$size = 0;
|
||||
|
||||
$directory = \opendir($path);
|
||||
|
||||
if (!$directory) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (($file = \readdir($directory)) !== false) {
|
||||
// Skip file pointers
|
||||
if ($file[0] == '.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Go recursive down, or add the file size
|
||||
if (\is_dir($path.$file)) {
|
||||
$size += $this->getDirectorySize($path.$file.DIRECTORY_SEPARATOR);
|
||||
} else {
|
||||
$size += \filesize($path.$file);
|
||||
}
|
||||
}
|
||||
|
||||
\closedir($directory);
|
||||
|
||||
return $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Partition Free Space.
|
||||
*
|
||||
* disk_free_space — Returns available space on filesystem or disk partition
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getPartitionFreeSpace():float
|
||||
{
|
||||
return \disk_free_space($this->getRoot());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Partition Total Space.
|
||||
*
|
||||
* disk_total_space — Returns the total size of a filesystem or disk partition
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getPartitionTotalSpace():float
|
||||
{
|
||||
return \disk_total_space($this->getRoot());
|
||||
}
|
||||
}
|
|
@ -1,196 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Device;
|
||||
|
||||
use Appwrite\Storage\Device;
|
||||
|
||||
class S3 extends Device
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName():string
|
||||
{
|
||||
return 'S3 Storage';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription():string
|
||||
{
|
||||
return 'S3 Bucket Storage drive for AWS or on premise solution';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRoot():string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath($filename):string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Upload.
|
||||
*
|
||||
* Upload a file to desired destination in the selected disk.
|
||||
*
|
||||
* @param string $target
|
||||
* @param string $filename
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function upload($source, $path):bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read file by given path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function read(string $path):string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Write file by given path.
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $data
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function write(string $path, string $data):bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move file from given source to given path, Return true on success and false on failure.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $target
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function move(string $source, string $target):bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete file in given path, Return true on success and false on failure.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete(string $path, bool $recursive = false):bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns given file path its size.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.filesize.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getFileSize(string $path):int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns given file path its mime type.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.mime-content-type.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFileMimeType(string $path):string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns given file path its MD5 hash value.
|
||||
*
|
||||
* @see http://php.net/manual/en/function.md5-file.php
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFileHash(string $path):string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get directory size in bytes.
|
||||
*
|
||||
* Return -1 on error
|
||||
*
|
||||
* Based on http://www.jonasjohn.de/snippets/php/dir-size.htm
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDirectorySize(string $path):int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Partition Free Space.
|
||||
*
|
||||
* disk_free_space — Returns available space on filesystem or disk partition
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getPartitionFreeSpace():float
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Partition Total Space.
|
||||
*
|
||||
* disk_total_space — Returns the total size of a filesystem or disk partition
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getPartitionTotalSpace():float
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage;
|
||||
|
||||
use Exception;
|
||||
|
||||
class Storage
|
||||
{
|
||||
/**
|
||||
* Devices.
|
||||
*
|
||||
* List of all available storage devices
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $devices = [];
|
||||
|
||||
/**
|
||||
* Set Device.
|
||||
*
|
||||
* Add device by name
|
||||
*
|
||||
* @param string $name
|
||||
* @param Device $device
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setDevice($name, Device $device): void
|
||||
{
|
||||
self::$devices[$name] = $device;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Device.
|
||||
*
|
||||
* Get device by name
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return Device
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getDevice($name)
|
||||
{
|
||||
if (!\array_key_exists($name, self::$devices)) {
|
||||
throw new Exception('The device "'.$name.'" is not listed');
|
||||
}
|
||||
|
||||
return self::$devices[$name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Exists.
|
||||
*
|
||||
* Checks if given storage name is registered or not
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function exists($name)
|
||||
{
|
||||
return (bool) \array_key_exists($name, self::$devices);
|
||||
}
|
||||
|
||||
/**
|
||||
* Human readable data size format from bytes input.
|
||||
*
|
||||
* Based on: https://stackoverflow.com/a/38659168/2299554
|
||||
*
|
||||
* @param int $bytes
|
||||
* @param int $decimals
|
||||
* @param string $system
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function human(int $bytes, $decimals = 2, $system = 'metric')
|
||||
{
|
||||
$mod = ($system === 'binary') ? 1024 : 1000;
|
||||
|
||||
$units = array(
|
||||
'binary' => array(
|
||||
'B',
|
||||
'KiB',
|
||||
'MiB',
|
||||
'GiB',
|
||||
'TiB',
|
||||
'PiB',
|
||||
'EiB',
|
||||
'ZiB',
|
||||
'YiB',
|
||||
),
|
||||
'metric' => array(
|
||||
'B',
|
||||
'kB',
|
||||
'MB',
|
||||
'GB',
|
||||
'TB',
|
||||
'PB',
|
||||
'EB',
|
||||
'ZB',
|
||||
'YB',
|
||||
),
|
||||
);
|
||||
|
||||
$factor = (int)floor((strlen((string)$bytes) - 1) / 3);
|
||||
|
||||
return sprintf("%.{$decimals}f%s", $bytes / pow($mod, $factor), $units[$system][$factor]);
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Validator;
|
||||
|
||||
use Utopia\Validator;
|
||||
|
||||
class File extends Validator
|
||||
{
|
||||
public function getDescription()
|
||||
{
|
||||
return 'File is not valid';
|
||||
}
|
||||
|
||||
/**
|
||||
* NOT MUCH RIGHT NOW.
|
||||
*
|
||||
* TODO think what to do here, currently only used for parameter to be present in SDKs
|
||||
*
|
||||
* @param mixed $name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid($name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Validator;
|
||||
|
||||
use Utopia\Validator;
|
||||
|
||||
class FileName extends Validator
|
||||
{
|
||||
public function getDescription()
|
||||
{
|
||||
return 'Filename is not valid';
|
||||
}
|
||||
|
||||
/**
|
||||
* The file name can only contain "a-z", "A-Z", "0-9" and "-" and not empty.
|
||||
*
|
||||
* @param mixed $name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid($name)
|
||||
{
|
||||
if (empty($name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_string($name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!\preg_match('/^[a-zA-Z0-9.]+$/', $name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Validator;
|
||||
|
||||
use Utopia\Validator;
|
||||
|
||||
class FileSize extends Validator
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $max;
|
||||
|
||||
/**
|
||||
* Max size in bytes
|
||||
*
|
||||
* @param int $max
|
||||
*/
|
||||
public function __construct($max)
|
||||
{
|
||||
$this->max = $max;
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
{
|
||||
return 'File size can\'t be bigger than '.$this->max;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds whether a file size is smaller than required limit.
|
||||
*
|
||||
* @param mixed $fileSize
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid($fileSize)
|
||||
{
|
||||
if (!is_int($fileSize)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($fileSize > $this->max) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Validator;
|
||||
|
||||
use Exception;
|
||||
use Utopia\Validator;
|
||||
|
||||
class FileType extends Validator
|
||||
{
|
||||
/**
|
||||
* File Types Constants.
|
||||
*/
|
||||
const FILE_TYPE_JPEG = 'jpeg';
|
||||
const FILE_TYPE_GIF = 'gif';
|
||||
const FILE_TYPE_PNG = 'png';
|
||||
const FILE_TYPE_GZIP = 'gz';
|
||||
|
||||
/**
|
||||
* File Type Binaries.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $types = array(
|
||||
self::FILE_TYPE_JPEG => "\xFF\xD8\xFF",
|
||||
self::FILE_TYPE_GIF => 'GIF',
|
||||
self::FILE_TYPE_PNG => "\x89\x50\x4e\x47\x0d\x0a",
|
||||
self::FILE_TYPE_GZIP => "application/x-gzip",
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $whiteList;
|
||||
|
||||
/**
|
||||
* @param array $whiteList
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct(array $whiteList)
|
||||
{
|
||||
foreach ($whiteList as $key) {
|
||||
if (!isset($this->types[$key])) {
|
||||
throw new Exception('Unknown file mime type');
|
||||
}
|
||||
}
|
||||
|
||||
$this->whiteList = $whiteList;
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
{
|
||||
return 'File mime-type is not allowed ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is Valid.
|
||||
*
|
||||
* Binary check to finds whether a file is of valid type
|
||||
*
|
||||
* @see http://stackoverflow.com/a/3313196
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid($path)
|
||||
{
|
||||
if (!\is_readable($path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$handle = \fopen($path, 'r');
|
||||
|
||||
if (!$handle) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$bytes = \fgets($handle, 8);
|
||||
|
||||
foreach ($this->whiteList as $key) {
|
||||
if (\strpos($bytes, $this->types[$key]) === 0) {
|
||||
\fclose($handle);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
\fclose($handle);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Storage\Validator;
|
||||
|
||||
use Utopia\Validator;
|
||||
|
||||
class Upload extends Validator
|
||||
{
|
||||
public function getDescription()
|
||||
{
|
||||
return 'Not a valid upload file';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a file is a valid upload file
|
||||
*
|
||||
* @param mixed $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid($path)
|
||||
{
|
||||
if (!is_string($path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (\is_uploaded_file($path)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ class HTTPTest extends Scope
|
|||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertEquals('Appwrite', $response['headers']['server']);
|
||||
$this->assertEquals('GET, POST, PUT, PATCH, DELETE', $response['headers']['access-control-allow-methods']);
|
||||
$this->assertEquals('Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies', $response['headers']['access-control-allow-headers']);
|
||||
$this->assertEquals('Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies', $response['headers']['access-control-allow-headers']);
|
||||
$this->assertEquals('X-Fallback-Cookies', $response['headers']['access-control-expose-headers']);
|
||||
$this->assertEquals('http://localhost', $response['headers']['access-control-allow-origin']);
|
||||
$this->assertEquals('true', $response['headers']['access-control-allow-credentials']);
|
||||
|
|
|
@ -455,24 +455,6 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
public function testENVS():array
|
||||
{
|
||||
sleep(120);
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
*/
|
||||
$file = $this->client->call(Client::METHOD_POST, '/storage/files', array_merge([
|
||||
'content-type' => 'multipart/form-data',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'),
|
||||
'read' => ['*'],
|
||||
'write' => ['*'],
|
||||
'folderId' => 'xyz',
|
||||
]);
|
||||
|
||||
$this->assertEquals($file['headers']['status-code'], 201);
|
||||
$this->assertNotEmpty($file['body']['$id']);
|
||||
|
||||
$fileId = $file['body']['$id'] ?? '';
|
||||
|
||||
$functions = realpath(__DIR__ . '/../../../resources/functions');
|
||||
|
||||
|
@ -508,7 +490,15 @@ class FunctionsCustomServerTest extends Scope
|
|||
[
|
||||
'language' => 'Node.js',
|
||||
'version' => '14.5',
|
||||
'name' => 'node-14',
|
||||
'name' => 'node-14.5',
|
||||
'code' => $functions.'/node.tar.gz',
|
||||
'command' => 'node index.js',
|
||||
'timeout' => 15,
|
||||
],
|
||||
[
|
||||
'language' => 'Node.js',
|
||||
'version' => '15.5',
|
||||
'name' => 'node-15.5',
|
||||
'code' => $functions.'/node.tar.gz',
|
||||
'command' => 'node index.js',
|
||||
'timeout' => 15,
|
||||
|
@ -521,6 +511,14 @@ class FunctionsCustomServerTest extends Scope
|
|||
'command' => 'ruby app.rb',
|
||||
'timeout' => 15,
|
||||
],
|
||||
[
|
||||
'language' => 'Ruby',
|
||||
'version' => '3.0',
|
||||
'name' => 'ruby-3.0',
|
||||
'code' => $functions.'/ruby.tar.gz',
|
||||
'command' => 'ruby app.rb',
|
||||
'timeout' => 15,
|
||||
],
|
||||
[
|
||||
'language' => 'Deno',
|
||||
'version' => '1.5',
|
||||
|
@ -529,8 +527,36 @@ class FunctionsCustomServerTest extends Scope
|
|||
'command' => 'deno run --allow-env index.ts',
|
||||
'timeout' => 15,
|
||||
],
|
||||
[
|
||||
'language' => 'Deno',
|
||||
'version' => '1.6',
|
||||
'name' => 'deno-1.6',
|
||||
'code' => $functions.'/deno.tar.gz',
|
||||
'command' => 'deno run --allow-env index.ts',
|
||||
'timeout' => 15,
|
||||
],
|
||||
];
|
||||
|
||||
sleep(count($envs) * 25);
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
*/
|
||||
$file = $this->client->call(Client::METHOD_POST, '/storage/files', array_merge([
|
||||
'content-type' => 'multipart/form-data',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'),
|
||||
'read' => ['*'],
|
||||
'write' => ['*'],
|
||||
'folderId' => 'xyz',
|
||||
]);
|
||||
|
||||
$this->assertEquals($file['headers']['status-code'], 201);
|
||||
$this->assertNotEmpty($file['body']['$id']);
|
||||
|
||||
$fileId = $file['body']['$id'] ?? '';
|
||||
|
||||
foreach ($envs as $key => $env) {
|
||||
$language = $env['language'] ?? '';
|
||||
$version = $env['version'] ?? '';
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Tests;
|
||||
|
||||
use Appwrite\Storage\Compression\Algorithms\GZIP;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class GZIPTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var GZIP
|
||||
*/
|
||||
protected $object = null;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->object = new GZIP();
|
||||
}
|
||||
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function testName()
|
||||
{
|
||||
$this->assertEquals($this->object->getName(), 'gzip');
|
||||
}
|
||||
|
||||
public function testCompressDecompressWithText()
|
||||
{
|
||||
$demo = 'This is a demo string';
|
||||
$demoSize = mb_strlen($demo, '8bit');
|
||||
|
||||
$data = $this->object->compress($demo);
|
||||
$dataSize = mb_strlen($data, '8bit');
|
||||
|
||||
$this->assertEquals($demoSize, 21);
|
||||
$this->assertEquals($dataSize, 39);
|
||||
|
||||
$this->assertEquals($this->object->decompress($data), $demo);
|
||||
}
|
||||
|
||||
public function testCompressDecompressWithJPGImage()
|
||||
{
|
||||
$demo = \file_get_contents(__DIR__ . '/../../../../resources/disk-a/kitten-1.jpg');
|
||||
$demoSize = mb_strlen($demo, '8bit');
|
||||
|
||||
$data = $this->object->compress($demo);
|
||||
$dataSize = mb_strlen($data, '8bit');
|
||||
|
||||
$this->assertEquals($demoSize, 599639);
|
||||
$this->assertEquals($dataSize, 599107);
|
||||
|
||||
$this->assertGreaterThan($dataSize, $demoSize);
|
||||
|
||||
$data = $this->object->decompress($data);
|
||||
$dataSize = mb_strlen($data, '8bit');
|
||||
|
||||
$this->assertEquals($dataSize, 599639);
|
||||
}
|
||||
|
||||
public function testCompressDecompressWithPNGImage()
|
||||
{
|
||||
$demo = \file_get_contents(__DIR__ . '/../../../../resources/disk-b/kitten-1.png');
|
||||
$demoSize = mb_strlen($demo, '8bit');
|
||||
|
||||
$data = $this->object->compress($demo);
|
||||
$dataSize = mb_strlen($data, '8bit');
|
||||
|
||||
$this->assertEquals($demoSize, 3038056);
|
||||
$this->assertEquals($dataSize, 3029202);
|
||||
|
||||
$this->assertGreaterThan($dataSize, $demoSize);
|
||||
|
||||
$data = $this->object->decompress($data);
|
||||
$dataSize = mb_strlen($data, '8bit');
|
||||
|
||||
$this->assertEquals($dataSize, 3038056);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue