1
0
Fork 0
mirror of synced 2024-09-21 03:52:23 +12:00

Merge branch 'master' of https://github.com/appwrite/appwrite into feat-0-11-0-changes

This commit is contained in:
Torsten Dittmann 2021-10-17 14:02:23 +02:00
commit 361d097163
6 changed files with 38 additions and 68 deletions

View file

@ -1,41 +0,0 @@
name: "Tests"
on: [pull_request]
jobs:
tests:
name: Unit & E2E
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Build Appwrite
# Upstream bug causes buildkit pulls to fail so prefetch base images
# https://github.com/moby/moby/issues/41864
run: |
echo "_APP_FUNCTIONS_RUNTIMES=php-8.0" >> .env
docker pull composer:2.0
docker pull php:8.0-cli-alpine
docker-compose build
docker-compose up -d
sleep 10
- name: Doctor
run: docker-compose exec -T appwrite doctor
- name: Environment Variables
run: docker-compose exec -T appwrite vars
- name: Run Tests
run: docker-compose exec -T appwrite test --debug

View file

@ -395,7 +395,7 @@ Pull requests are great, but there are many other areas where you can help Appwr
### Blogging & Speaking
Blogging, speaking about, or creating tutorials about one of Appwrites many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or email team [at] appwrite [dot] io so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub.
Blogging, speaking about, or creating tutorials about one of Appwrites many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or [email team@appwrite.io](mailto:team@appwrite.io) so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub.
### Presenting at Meetups

View file

@ -16,6 +16,20 @@ return [
'video/quicktime',
'video/x-msvideo',
'video/x-ms-wmv',
// Audio Files
'audio/basic', // au snd RFC 2046
'auido/L24', // Linear PCM RFC 3190
'audio/mid', // mid rmi
'audio/mpeg', // mp3 RFC 3003
'audio/mp4', // mp4 audio
'audio/x-aiff', // aif aifc aiff
'audio/x-mpegurl', // m3u
'audio/vnd.rn-realaudio', // ra ram
'audio/ogg', // Ogg Vorbis RFC 5334
'audio/vorbis', // Vorbis RFC 5215
'audio/vnd.wav', // wav RFC 2361
// Microsoft Word
'application/msword',

View file

@ -25,7 +25,7 @@ input, textarea {
input[type=file],
input[type=file]::-webkit-file-upload-button {
cursor: pointer;
cursor: pointer;
}
button,
@ -412,6 +412,7 @@ fieldset {
width: ~"calc(100% - 2px)";
max-height: 180px;
visibility: visible !important;
object-fit: contain;
}
.video-preview {
@ -591,7 +592,7 @@ input[type=checkbox], input[type=radio] {
color: var(--config-color-background-fade);
background: var(--config-color-focus);
}
&[type=radio] {
&:checked:after {
//content: '●';
@ -650,7 +651,7 @@ input[type=checkbox], input[type=radio] {
color: var(--config-color-fade);
padding: 5px 15px;
font-size: 12px;
form {
display: inline-block;
}
@ -817,7 +818,7 @@ label.switch {
&:focus,
&:hover {
background: var(--config-color-success);
}
}
}
&:focus,
@ -929,7 +930,7 @@ hr {
height: 1px;
background: var(--config-border-color)!important;
border: none;
&.fade {
opacity: .7;
}
@ -1299,7 +1300,7 @@ ol {
height: 26px;
width: 44px;
margin: 9px 0;
button {
padding: 3px;
display: block;
@ -1322,7 +1323,7 @@ ol {
&.force-light {
.pull-end;
}
&.force-dark {
.pull-start;
}
@ -1354,4 +1355,4 @@ ol {
&.info {
background: var(--config-color-info)!important;
}
}
}

View file

@ -52,7 +52,7 @@ abstract class Migration
/**
* Migration constructor.
*
*
* @param PDO $pdo
*/
public function __construct(PDO $db)
@ -62,11 +62,11 @@ abstract class Migration
/**
* Set project for migration.
*
*
* @param Document $project
* @param Database $projectDB
*
* @return Migration
*
* @return Migration
*/
public function setProject(Document $project, Database $projectDB): Migration
{
@ -78,7 +78,7 @@ abstract class Migration
/**
* Iterates through every document.
*
*
* @param callable $callback
*/
public function forEachDocument(callable $callback): void
@ -98,7 +98,6 @@ abstract class Migration
Console::log('Migrating: ' . $offset . ' / ' . $this->projectDB->getSum());
\Co\run(function () use ($all, $callback) {
foreach ($all as $document) {
go(function () use ($document, $callback) {
if (empty($document->getId()) || empty($document->getCollection())) {
@ -131,24 +130,23 @@ abstract class Migration
}
}
public function check_diff_multi($array1, $array2){
public function check_diff_multi($array1, $array2)
{
$result = array();
foreach($array1 as $key => $val) {
if(is_array($val) && isset($array2[$key])) {
foreach ($array1 as $key => $val) {
if (is_array($val) && isset($array2[$key])) {
$tmp = $this->check_diff_multi($val, $array2[$key]);
if($tmp) {
if ($tmp) {
$result[$key] = $tmp;
}
}
elseif(!isset($array2[$key])) {
} elseif (!isset($array2[$key])) {
$result[$key] = null;
}
elseif($val !== $array2[$key]) {
} elseif ($val !== $array2[$key]) {
$result[$key] = $array2[$key];
}
if(isset($array2[$key])) {
if (isset($array2[$key])) {
unset($array2[$key]);
}
}

View file

@ -2,7 +2,6 @@
namespace Appwrite\Migration\Version;
use Utopia\App;
use Utopia\CLI\Console;
use Appwrite\Database\Database;
@ -35,8 +34,7 @@ class V06 extends Migration
case Database::SYSTEM_COLLECTION_KEYS:
if ($document->getAttribute('secret', null)) {
$json = \json_decode($document->getAttribute('secret'), true);
if (is_array($json))
{
if (is_array($json)) {
Console::log('Secret already encrypted. Skipped: ' . $document->getId());
break;
}