diff --git a/Dockerfile b/Dockerfile index a3984c12e..1b6578a02 100755 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT RUN npm ci RUN npm run build -FROM meldiron/base:0.4.3 as final +FROM appwrite/base:0.4.3 as final LABEL maintainer="team@appwrite.io" diff --git a/app/config/collections.php b/app/config/collections.php index 862429ad1..feea0db3b 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -243,6 +243,17 @@ $commonCollections = [ 'array' => false, 'filters' => ['datetime'], ], + [ + '$id' => ID::custom('vcsGithubAccessToken'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'], + ], [ '$id' => ID::custom('vcsGithubAccessTokenExpiry'), 'type' => Database::VAR_DATETIME, @@ -1681,6 +1692,16 @@ $projectCollections = array_merge([ 'required' => true, 'array' => false, ], + [ + '$id' => ID::custom('live'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => true, + 'array' => false, + ], [ '$id' => ID::custom('installationId'), 'type' => Database::VAR_STRING, diff --git a/app/console b/app/console index 7d62f90e7..ebe4fb0ee 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 7d62f90e7ff7b0dbb2ddb6deb0fd45260d4cae21 +Subproject commit ebe4fb0eefbe770d99dd458a69a717cfa532080d diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 5ccdef076..b6cd43e70 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -120,7 +120,7 @@ App::post('/v1/functions') ->param('providerRepositoryId', '', new Text(128), 'Repository ID of the repo linked to the function', true) ->param('providerBranch', '', new Text(128), 'Production branch for the repo linked to the function', true) ->param('providerSilentMode', false, new Boolean(), 'Is VCS connection in silent mode for the repo linked to the function?', true) - ->param('providerRootDirectory', '', new Text(128), 'Path to function code in the linked repo', true) + ->param('providerRootDirectory', '', new Text(128, 0), 'Path to function code in the linked repo', true) ->param('templateRepository', '', new Text(128), 'Repository name of the template', true) ->param('templateOwner', '', new Text(128), 'Owner name of the template', true) ->param('templateRootDirectory', '', new Text(128), 'Path to function code in the template repo', true) @@ -587,7 +587,7 @@ App::put('/v1/functions/:functionId') ->param('providerRepositoryId', '', new Text(128), 'Repository ID of the repo linked to the function', true) ->param('providerBranch', '', new Text(128), 'Production branch for the repo linked to the function', true) ->param('providerSilentMode', false, new Boolean(), 'Is VCS connection in silent mode for the repo linked to the function?', true) - ->param('providerRootDirectory', '', new Text(128), 'Path to function code in the linked repo', true) + ->param('providerRootDirectory', '', new Text(128, 0), 'Path to function code in the linked repo', true) ->inject('request') ->inject('response') ->inject('dbForProject') @@ -1285,7 +1285,7 @@ App::post('/v1/functions/:functionId/executions') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_EXECUTION) ->param('functionId', '', new UID(), 'Function ID.') - ->param('body', '', new Text(8192), 'HTTP body of execution. Default value is empty string.', true) + ->param('body', '', new Text(8192, 0), 'HTTP body of execution. Default value is empty string.', true) ->param('async', false, new Boolean(), 'Execute code in the background. Default value is false.', true) ->param('path', '/', new Text(2048), 'HTTP path of execution. Path can include query params. Default value is /', true) ->param('method', 'POST', new Whitelist(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], true), 'HTTP method of execution. Default value is GET.', true) diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index c45c56df9..6f290a540 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -267,10 +267,10 @@ App::get('/v1/vcs/github/callback') ->groups(['api', 'vcs']) ->label('scope', 'public') ->label('error', __DIR__ . '/../../views/general/error.phtml') - ->param('installation_id', '', new Text(256), 'GitHub installation ID', true) - ->param('setup_action', '', new Text(256), 'GitHub setup actuon type', true) + ->param('installation_id', '', new Text(256, 0), 'GitHub installation ID', true) + ->param('setup_action', '', new Text(256, 0), 'GitHub setup actuon type', true) ->param('state', '', new Text(2048), 'GitHub state. Contains info sent when starting authorization flow.', true) - ->param('code', '', new Text(2048), 'OAuth2 code.', true) + ->param('code', '', new Text(2048, 0), 'OAuth2 code.', true) ->inject('gitHub') ->inject('user') ->inject('project') diff --git a/app/init.php b/app/init.php index 15da74cc6..5736aa02f 100644 --- a/app/init.php +++ b/app/init.php @@ -1018,7 +1018,7 @@ App::setResource('project', function ($dbForConsole, $request, $console) { $projectId = $request->getParam('project', $request->getHeader('x-appwrite-project', '')); - if ($projectId === 'console') { + if (empty($projectId) || $projectId === 'console') { return $console; } diff --git a/docker-compose.yml b/docker-compose.yml index 7644c183a..5f3ef6945 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -727,7 +727,7 @@ services: hostname: exc1 <<: *x-logging stop_signal: SIGINT - image: meldiron/executor:0.3.5 + image: meldiron/executor:0.3.6 networks: - appwrite - runtimes