mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '1.8.x' into database-aliases
This commit is contained in:
+6
-1
@@ -9,4 +9,9 @@ reviews:
|
||||
- main
|
||||
- 1.6.x
|
||||
- 1.7.x
|
||||
- 1.8.x
|
||||
- 1.8.x
|
||||
high_level_summary: false
|
||||
poem: false
|
||||
sequence_diagrams: false
|
||||
collapse_walkthrough: true
|
||||
changed_files_summary: false
|
||||
|
||||
+4
-4
@@ -125,7 +125,7 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
@@ -145,7 +145,7 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
@@ -167,7 +167,7 @@ CLI::setResource('getLogsDB', function (Group $pools, Cache $cache) {
|
||||
|
||||
return function (?Document $project = null) use ($pools, $cache, $database) {
|
||||
if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
|
||||
$database->setTenant($project->getSequence());
|
||||
$database->setTenant((int)$project->getSequence());
|
||||
return $database;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ CLI::setResource('getLogsDB', function (Group $pools, Cache $cache) {
|
||||
|
||||
// set tenant
|
||||
if ($project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
|
||||
$database->setTenant($project->getSequence());
|
||||
$database->setTenant((int)$project->getSequence());
|
||||
}
|
||||
|
||||
return $database;
|
||||
|
||||
@@ -4492,6 +4492,29 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -35112,6 +35112,17 @@
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "providerReference",
|
||||
"description": "Git reference (branch, tag, commit) to get contents from",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<PROVIDER_REFERENCE>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4638,6 +4638,29 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -35319,6 +35319,15 @@
|
||||
"x-example": "<PROVIDER_ROOT_DIRECTORY>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "providerReference",
|
||||
"description": "Git reference (branch, tag, commit) to get contents from",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<PROVIDER_REFERENCE>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3880,7 +3880,7 @@ App::patch('/v1/account/mfa')
|
||||
if ($user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false)) {
|
||||
$factors[] = Type::PHONE;
|
||||
}
|
||||
$factors = \array_unique($factors);
|
||||
$factors = \array_values(\array_unique($factors));
|
||||
|
||||
$session->setAttribute('factors', $factors);
|
||||
$dbForProject->updateDocument('sessions', $session->getId(), $session);
|
||||
@@ -4065,7 +4065,7 @@ App::put('/v1/account/mfa/authenticators/:type')
|
||||
|
||||
$factors = $session->getAttribute('factors', []);
|
||||
$factors[] = $type;
|
||||
$factors = \array_unique($factors);
|
||||
$factors = \array_values(\array_unique($factors));
|
||||
|
||||
$session->setAttribute('factors', $factors);
|
||||
$dbForProject->updateDocument('sessions', $session->getId(), $session);
|
||||
@@ -4549,7 +4549,7 @@ App::put('/v1/account/mfa/challenge')
|
||||
|
||||
$factors = $session->getAttribute('factors', []);
|
||||
$factors[] = $type;
|
||||
$factors = \array_unique($factors);
|
||||
$factors = \array_values(\array_unique($factors));
|
||||
|
||||
$session
|
||||
->setAttribute('factors', $factors)
|
||||
|
||||
@@ -230,7 +230,7 @@ App::post('/v1/projects')
|
||||
if ($sharedTables) {
|
||||
$dbForProject
|
||||
->setSharedTables(true)
|
||||
->setTenant($sharedTablesV1 ? $project->getSequence() : null)
|
||||
->setTenant($sharedTablesV1 ? (int)$project->getSequence() : null)
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$dbForProject
|
||||
|
||||
@@ -605,11 +605,12 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
|
||||
->param('installationId', '', new Text(256), 'Installation Id')
|
||||
->param('providerRepositoryId', '', new Text(256), 'Repository Id')
|
||||
->param('providerRootDirectory', '', new Text(256, 0), 'Path to get contents of nested directory', true)
|
||||
->param('providerReference', '', new Text(256, 0), 'Git reference (branch, tag, commit) to get contents from', true)
|
||||
->inject('gitHub')
|
||||
->inject('response')
|
||||
->inject('project')
|
||||
->inject('dbForPlatform')
|
||||
->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, GitHub $github, Response $response, Document $project, Database $dbForPlatform) {
|
||||
->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, string $providerReference, GitHub $github, Response $response, Document $project, Database $dbForPlatform) {
|
||||
$installation = $dbForPlatform->getDocument('installations', $installationId);
|
||||
|
||||
if ($installation->isEmpty()) {
|
||||
@@ -631,7 +632,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
|
||||
throw new Exception(Exception::PROVIDER_REPOSITORY_NOT_FOUND);
|
||||
}
|
||||
|
||||
$contents = $github->listRepositoryContents($owner, $repositoryName, $providerRootDirectory);
|
||||
$contents = $github->listRepositoryContents($owner, $repositoryName, $providerRootDirectory, $providerReference);
|
||||
|
||||
$vcsContents = [];
|
||||
foreach ($contents as $content) {
|
||||
|
||||
+10
-11
@@ -511,28 +511,27 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
'function' => $deployment->getAttribute('entrypoint', ''),
|
||||
'site' => '',
|
||||
};
|
||||
$source = $deployment->getAttribute('buildPath', '');
|
||||
$extension = str_ends_with($source, '.tar') ? 'tar' : 'tar.gz';
|
||||
|
||||
if ($type === 'function') {
|
||||
$runtimeEntrypoint = match ($version) {
|
||||
'v2' => '',
|
||||
default => 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $runtime['startCommand'] . '"'
|
||||
};
|
||||
} elseif ($type === 'site') {
|
||||
$startCommand = $runtime['startCommand'];
|
||||
if ($type === 'site') {
|
||||
$frameworks = Config::getParam('frameworks', []);
|
||||
$framework = $frameworks[$resource->getAttribute('framework', '')] ?? null;
|
||||
|
||||
$startCommand = $runtime['startCommand'];
|
||||
|
||||
if (!is_null($framework)) {
|
||||
$adapter = ($framework['adapters'] ?? [])[$deployment->getAttribute('adapter', '')] ?? null;
|
||||
if (!is_null($adapter) && isset($adapter['startCommand'])) {
|
||||
$startCommand = $adapter['startCommand'];
|
||||
}
|
||||
}
|
||||
|
||||
$runtimeEntrypoint = 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $startCommand . '"';
|
||||
}
|
||||
|
||||
$runtimeEntrypoint = match ($version) {
|
||||
'v2' => '',
|
||||
default => "cp /tmp/code.$extension /mnt/code/code.$extension && nohup helpers/start.sh \"$startCommand\"",
|
||||
};
|
||||
|
||||
$entrypoint = match ($type) {
|
||||
'function' => $deployment->getAttribute('entrypoint', ''),
|
||||
'site' => '',
|
||||
@@ -545,7 +544,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
variables: $vars,
|
||||
timeout: $resource->getAttribute('timeout', 30),
|
||||
image: $runtime['image'],
|
||||
source: $deployment->getAttribute('buildPath', ''),
|
||||
source: $source,
|
||||
entrypoint: $entrypoint,
|
||||
version: $version,
|
||||
path: $path,
|
||||
|
||||
@@ -348,7 +348,7 @@ App::setResource('dbForProject', function (Group $pools, Database $dbForPlatform
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
@@ -401,7 +401,7 @@ App::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
@@ -431,7 +431,7 @@ App::setResource('getLogsDB', function (Group $pools, Cache $cache) {
|
||||
|
||||
return function (?Document $project = null) use ($pools, $cache, &$database) {
|
||||
if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
|
||||
$database->setTenant($project->getSequence());
|
||||
$database->setTenant((int)$project->getSequence());
|
||||
return $database;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ App::setResource('getLogsDB', function (Group $pools, Cache $cache) {
|
||||
|
||||
// set tenant
|
||||
if ($project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
|
||||
$database->setTenant($project->getSequence());
|
||||
$database->setTenant((int)$project->getSequence());
|
||||
}
|
||||
|
||||
return $database;
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ if (!function_exists('getProjectDB')) {
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
|
||||
@@ -841,7 +841,7 @@ $image = $this->getParam('image', '');
|
||||
- _APP_DB_PASS
|
||||
|
||||
appwrite-assistant:
|
||||
image: appwrite/assistant:0.4.0
|
||||
image: appwrite/assistant:0.8.3
|
||||
container_name: appwrite-assistant
|
||||
<<: *x-logging
|
||||
restart: unless-stopped
|
||||
|
||||
+5
-5
@@ -94,7 +94,7 @@ Server::setResource('dbForProject', function (Cache $cache, Registry $register,
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
@@ -131,7 +131,7 @@ Server::setResource('getProjectDB', function (Group $pools, Database $dbForPlatf
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
@@ -153,7 +153,7 @@ Server::setResource('getProjectDB', function (Group $pools, Database $dbForPlatf
|
||||
if (\in_array($dsn->getHost(), $sharedTables)) {
|
||||
$database
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getSequence())
|
||||
->setTenant((int)$project->getSequence())
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$database
|
||||
@@ -172,7 +172,7 @@ Server::setResource('getLogsDB', function (Group $pools, Cache $cache) {
|
||||
$database = null;
|
||||
return function (?Document $project = null) use ($pools, $cache, $database) {
|
||||
if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
|
||||
$database->setTenant($project->getSequence());
|
||||
$database->setTenant((int)$project->getSequence());
|
||||
return $database;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ Server::setResource('getLogsDB', function (Group $pools, Cache $cache) {
|
||||
|
||||
// set tenant
|
||||
if ($project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
|
||||
$database->setTenant($project->getSequence());
|
||||
$database->setTenant((int)$project->getSequence());
|
||||
}
|
||||
|
||||
return $database;
|
||||
|
||||
Generated
+25
-26
@@ -1874,16 +1874,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "3.0.43",
|
||||
"version": "3.0.44",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "709ec107af3cb2f385b9617be72af8cf62441d02"
|
||||
"reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02",
|
||||
"reference": "709ec107af3cb2f385b9617be72af8cf62441d02",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1d0b5e7e1434678411787c5a0535e68907cf82d9",
|
||||
"reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1964,7 +1964,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.43"
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.44"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1980,7 +1980,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-12-14T21:12:59+00:00"
|
||||
"time": "2025-06-15T09:59:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
@@ -3490,16 +3490,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/database",
|
||||
"version": "0.71.4",
|
||||
"version": "0.71.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "308cbeb65780f954f9f3abfff2ef17c5941ae00e"
|
||||
"reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/308cbeb65780f954f9f3abfff2ef17c5941ae00e",
|
||||
"reference": "308cbeb65780f954f9f3abfff2ef17c5941ae00e",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/2bd87acc40af087fc0fdcccc47c43141dff0be5c",
|
||||
"reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3540,9 +3540,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/0.71.4"
|
||||
"source": "https://github.com/utopia-php/database/tree/0.71.6"
|
||||
},
|
||||
"time": "2025-06-10T15:47:50+00:00"
|
||||
"time": "2025-06-16T16:48:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/detector",
|
||||
@@ -4807,16 +4807,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "0.41.4",
|
||||
"version": "0.41.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "07804269131f411576aac60c795a5ebc3afaa48a"
|
||||
"reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/07804269131f411576aac60c795a5ebc3afaa48a",
|
||||
"reference": "07804269131f411576aac60c795a5ebc3afaa48a",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b",
|
||||
"reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4852,9 +4852,9 @@
|
||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||
"support": {
|
||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.4"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.7"
|
||||
},
|
||||
"time": "2025-06-10T08:28:11+00:00"
|
||||
"time": "2025-06-13T17:05:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
@@ -5147,16 +5147,16 @@
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/minify",
|
||||
"version": "1.3.73",
|
||||
"version": "1.3.74",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/matthiasmullie/minify.git",
|
||||
"reference": "cb7a9297b4ab070909cefade30ee95054d4ae87a"
|
||||
"reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/cb7a9297b4ab070909cefade30ee95054d4ae87a",
|
||||
"reference": "cb7a9297b4ab070909cefade30ee95054d4ae87a",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a2593286a4135d03c6a6a9e9aeded5d41e931ce4",
|
||||
"reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5167,8 +5167,7 @@
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": ">=2.0",
|
||||
"matthiasmullie/scrapbook": ">=1.3",
|
||||
"phpunit/phpunit": ">=4.8",
|
||||
"squizlabs/php_codesniffer": ">=3.0"
|
||||
"phpunit/phpunit": ">=4.8"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/cache-implementation": "Cache implementation to use with Minify::cache"
|
||||
@@ -5206,7 +5205,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/matthiasmullie/minify/issues",
|
||||
"source": "https://github.com/matthiasmullie/minify/tree/1.3.73"
|
||||
"source": "https://github.com/matthiasmullie/minify/tree/1.3.74"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5214,7 +5213,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-15T10:27:10+00:00"
|
||||
"time": "2025-06-12T08:06:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/path-converter",
|
||||
|
||||
+2
-2
@@ -213,7 +213,7 @@ services:
|
||||
appwrite-console:
|
||||
<<: *x-logging
|
||||
container_name: appwrite-console
|
||||
image: appwrite/console:6.0.32
|
||||
image: appwrite/console:6.0.41
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
@@ -934,7 +934,7 @@ services:
|
||||
|
||||
appwrite-assistant:
|
||||
container_name: appwrite-assistant
|
||||
image: appwrite/assistant:0.7.0
|
||||
image: appwrite/assistant:0.8.3
|
||||
networks:
|
||||
- appwrite
|
||||
environment:
|
||||
|
||||
@@ -386,7 +386,9 @@ class Create extends Base
|
||||
try {
|
||||
$version = $function->getAttribute('version', 'v2');
|
||||
$command = $runtime['startCommand'];
|
||||
$command = $version === 'v2' ? '' : 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '"';
|
||||
$source = $deployment->getAttribute('buildPath', '');
|
||||
$extension = str_ends_with($source, '.tar') ? 'tar' : 'tar.gz';
|
||||
$command = $version === 'v2' ? '' : "cp /tmp/code.$extension /mnt/code/code.$extension && nohup helpers/start.sh \"$command\"";
|
||||
$executionResponse = $executor->createExecution(
|
||||
projectId: $project->getId(),
|
||||
deploymentId: $deployment->getId(),
|
||||
@@ -394,7 +396,7 @@ class Create extends Base
|
||||
variables: $vars,
|
||||
timeout: $function->getAttribute('timeout', 0),
|
||||
image: $runtime['image'],
|
||||
source: $deployment->getAttribute('buildPath', ''),
|
||||
source: $source,
|
||||
entrypoint: $deployment->getAttribute('entrypoint', ''),
|
||||
version: $version,
|
||||
path: $path,
|
||||
|
||||
@@ -495,7 +495,7 @@ class Deletes extends Action
|
||||
* @throws Authorization
|
||||
* @throws DatabaseException
|
||||
*/
|
||||
private function deleteProject(Database $dbForPlatform, callable $getProjectDB, Device $deviceForFiles, Device $deviceForSites, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, Document $document): void
|
||||
protected function deleteProject(Database $dbForPlatform, callable $getProjectDB, Device $deviceForFiles, Device $deviceForSites, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, Document $document): void
|
||||
{
|
||||
$projectInternalId = $document->getSequence();
|
||||
$projectId = $document->getId();
|
||||
|
||||
@@ -519,7 +519,9 @@ class Functions extends Action
|
||||
try {
|
||||
$version = $function->getAttribute('version', 'v2');
|
||||
$command = $runtime['startCommand'];
|
||||
$command = $version === 'v2' ? '' : 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '"';
|
||||
$source = $deployment->getAttribute('buildPath', '');
|
||||
$extension = str_ends_with($source, '.tar') ? 'tar' : 'tar.gz';
|
||||
$command = $version === 'v2' ? '' : "cp /tmp/code.$extension /mnt/code/code.$extension && nohup helpers/start.sh \"$command\"";
|
||||
$executionResponse = $executor->createExecution(
|
||||
projectId: $project->getId(),
|
||||
deploymentId: $deploymentId,
|
||||
@@ -527,7 +529,7 @@ class Functions extends Action
|
||||
variables: $vars,
|
||||
timeout: $function->getAttribute('timeout', 0),
|
||||
image: $runtime['image'],
|
||||
source: $deployment->getAttribute('buildPath', ''),
|
||||
source: $source,
|
||||
entrypoint: $deployment->getAttribute('entrypoint', ''),
|
||||
version: $version,
|
||||
path: $path,
|
||||
|
||||
@@ -477,7 +477,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotEmpty($domain);
|
||||
|
||||
$deploymentId = $this->setupDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'true'
|
||||
]);
|
||||
$this->assertNotEmpty($deploymentId);
|
||||
@@ -856,7 +856,7 @@ class SitesCustomServerTest extends Scope
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'siteId' => $siteId,
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => true,
|
||||
]);
|
||||
|
||||
@@ -874,7 +874,7 @@ class SitesCustomServerTest extends Scope
|
||||
}, 50000, 500);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'false'
|
||||
]);
|
||||
|
||||
@@ -917,7 +917,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotNull($siteId);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'false'
|
||||
]);
|
||||
|
||||
@@ -969,7 +969,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotNull($siteId);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'false'
|
||||
]);
|
||||
|
||||
@@ -1014,7 +1014,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotNull($siteId);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'false'
|
||||
]);
|
||||
|
||||
@@ -1022,7 +1022,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'false'
|
||||
]);
|
||||
|
||||
@@ -1193,7 +1193,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotNull($siteId);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'false'
|
||||
]);
|
||||
|
||||
@@ -1318,7 +1318,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotNull($siteId);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'false'
|
||||
]);
|
||||
|
||||
@@ -1818,7 +1818,7 @@ class SitesCustomServerTest extends Scope
|
||||
]);
|
||||
|
||||
$deploymentId = $this->setupDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => true
|
||||
]);
|
||||
|
||||
@@ -2435,7 +2435,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotEmpty($siteId);
|
||||
|
||||
$deploymentId = $this->setupDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'true'
|
||||
]);
|
||||
|
||||
@@ -2477,7 +2477,7 @@ class SitesCustomServerTest extends Scope
|
||||
|
||||
// test canceled deployment error page
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'true'
|
||||
]);
|
||||
$deploymentId = $deployment['body']['$id'] ?? '';
|
||||
@@ -2517,7 +2517,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertStringContainsString('View deployments', $response['body']);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('astro'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => 'true'
|
||||
]);
|
||||
|
||||
@@ -2606,7 +2606,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotEmpty($siteId);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => true
|
||||
]);
|
||||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
@@ -2635,7 +2635,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertNotEmpty($siteId);
|
||||
|
||||
$deployment = $this->createDeployment($siteId, [
|
||||
'code' => $this->packageSite('static'),
|
||||
'code' => $this->packageSite('static-single-file'),
|
||||
'activate' => true
|
||||
]);
|
||||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
Reference in New Issue
Block a user