From 2ec6b7af85b03380ee4427a974db8d21e73b8ba0 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Tue, 24 Mar 2026 15:59:04 +0530 Subject: [PATCH] chore: Suggest `npm ci` instead of `npm install` --- app/config/frameworks.php | 42 +++++----- app/config/templates/function.php | 78 +++++++++---------- app/config/templates/site.php | 30 +++---- .../Response/Model/DetectionFramework.php | 2 +- .../Response/Model/DetectionRuntime.php | 2 +- .../Utopia/Response/Model/Framework.php | 2 +- .../Response/Model/FrameworkAdapter.php | 2 +- src/Appwrite/Utopia/Response/Model/Func.php | 2 +- src/Appwrite/Utopia/Response/Model/Site.php | 2 +- .../Response/Model/TemplateFramework.php | 2 +- .../Utopia/Response/Model/TemplateRuntime.php | 2 +- .../e2e/Services/VCS/VCSConsoleClientTest.php | 6 +- 12 files changed, 86 insertions(+), 86 deletions(-) diff --git a/app/config/frameworks.php b/app/config/frameworks.php index 6078c53c63..58f6a86af7 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -21,14 +21,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist/analog', 'startCommand' => 'bash helpers/analog/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist/analog/public', 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' @@ -47,14 +47,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist/angular', 'startCommand' => 'bash helpers/angular/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist/angular/browser', 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.csr.html' @@ -73,14 +73,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './.next', 'startCommand' => 'bash helpers/next-js/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './out', 'startCommand' => 'bash helpers/server.sh', ] @@ -96,7 +96,7 @@ return [ 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist', 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' @@ -115,14 +115,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './.output', 'startCommand' => 'bash helpers/nuxt/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run generate', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './output/public', 'startCommand' => 'bash helpers/server.sh', ] @@ -138,7 +138,7 @@ return [ 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist', 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' @@ -157,14 +157,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './build', 'startCommand' => 'bash helpers/sveltekit/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './build', 'startCommand' => 'bash helpers/server.sh', ] @@ -182,14 +182,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist', 'startCommand' => 'bash helpers/astro/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist', 'startCommand' => 'bash helpers/server.sh', ] @@ -207,14 +207,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './.output', 'startCommand' => 'bash helpers/tanstack-start/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist/client', 'startCommand' => 'bash helpers/server.sh', ] @@ -232,14 +232,14 @@ return [ 'ssr' => [ 'key' => 'ssr', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './build', 'startCommand' => 'bash helpers/remix/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './build/client', 'startCommand' => 'bash helpers/server.sh', ] @@ -255,7 +255,7 @@ return [ 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist', 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' @@ -289,7 +289,7 @@ return [ 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist', 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' @@ -306,7 +306,7 @@ return [ 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'outputDirectory' => './dist', 'startCommand' => 'bash helpers/server.sh', ], diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 6bdfb5ab80..861d4fcb58 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -62,7 +62,7 @@ return [ 'timeout' => 15, 'useCases' => [FunctionUseCases::STARTER], 'runtimes' => [ - ...getRuntimes($templateRuntimes['NODE'], 'npm install', 'src/main.js', 'node/starter', $allowList), + ...getRuntimes($templateRuntimes['NODE'], 'npm ci', 'src/main.js', 'node/starter', $allowList), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', @@ -105,7 +105,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/query-upstash-vector', $allowList @@ -151,7 +151,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/query-redis-labs', $allowList @@ -196,7 +196,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/query-neo4j-auradb', $allowList @@ -250,7 +250,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/query-mongo-atlas', $allowList @@ -289,7 +289,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/query-neon-postgres', $allowList @@ -358,7 +358,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/prompt-chatgpt', $allowList @@ -424,7 +424,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install && npm run setup', + 'npm ci && npm run setup', 'src/main.js', 'node/discord-command-bot', $allowList @@ -491,7 +491,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/analyze-with-perspectiveapi', $allowList @@ -529,7 +529,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/censor-with-redact', $allowList @@ -578,7 +578,7 @@ return [ 'timeout' => 15, 'useCases' => [FunctionUseCases::UTILITIES], 'runtimes' => [ - ...getRuntimes($templateRuntimes['NODE'], 'npm install', 'src/main.js', 'node/generate-pdf', $allowList) + ...getRuntimes($templateRuntimes['NODE'], 'npm ci', 'src/main.js', 'node/generate-pdf', $allowList) ], 'instructions' => 'For documentation and instructions check out file.', 'vcsProvider' => 'github', @@ -603,7 +603,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/github-issue-bot', $allowList @@ -648,7 +648,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/url-shortener', $allowList @@ -701,7 +701,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/sync-with-algolia', $allowList @@ -786,7 +786,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/sync-with-meilisearch', $allowList @@ -885,7 +885,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/whatsapp-with-vonage', $allowList @@ -978,7 +978,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/push-notification-with-fcm', $allowList @@ -1036,7 +1036,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/email-contact-form', $allowList @@ -1123,7 +1123,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/subscriptions-with-stripe', $allowList @@ -1166,7 +1166,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/payments-with-stripe', $allowList @@ -1225,7 +1225,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/text-generation-with-huggingface', $allowList @@ -1261,7 +1261,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/language-translation-with-huggingface', $allowList @@ -1297,7 +1297,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install && npm run setup', + 'npm ci && npm run setup', 'src/main.js', 'node/image-classification-with-huggingface', $allowList @@ -1357,7 +1357,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install && npm run setup', + 'npm ci && npm run setup', 'src/main.js', 'node/object-detection-with-huggingface', $allowList @@ -1417,7 +1417,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install && npm run setup', + 'npm ci && npm run setup', 'src/main.js', 'node/speech-recognition-with-huggingface', $allowList @@ -1480,7 +1480,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install && npm run setup', + 'npm ci && npm run setup', 'src/main.js', 'node/text-to-speech-with-huggingface', $allowList @@ -1540,7 +1540,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/generate-with-replicate', $allowList @@ -1577,7 +1577,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/generate-with-together-ai', $allowList @@ -1621,7 +1621,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/chat-with-perplexity-ai', $allowList @@ -1664,7 +1664,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/generate-with-replicate', $allowList @@ -1701,7 +1701,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/sync-with-pinecone', $allowList @@ -1766,7 +1766,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/rag-with-langchain', $allowList @@ -1831,7 +1831,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/speak-with-elevenlabs', $allowList @@ -1888,7 +1888,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/speak-with-lmnt', $allowList @@ -1931,7 +1931,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/chat-with-anyscale', $allowList @@ -1974,7 +1974,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install && npm run setup', + 'npm ci && npm run setup', 'src/main.js', 'node/music-generation-with-huggingface', $allowList @@ -2018,7 +2018,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/generate-with-fal-ai', $allowList @@ -2055,7 +2055,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/subscriptions-with-lemon-squeezy', $allowList @@ -2112,7 +2112,7 @@ return [ 'runtimes' => [ ...getRuntimes( $templateRuntimes['NODE'], - 'npm install', + 'npm ci', 'src/main.js', 'node/payments-with-lemon-squeezy', $allowList diff --git a/app/config/templates/site.php b/app/config/templates/site.php index 50a9fb8d5d..a961f0a7fb 100644 --- a/app/config/templates/site.php +++ b/app/config/templates/site.php @@ -48,7 +48,7 @@ const TEMPLATE_FRAMEWORKS = [ 'SVELTEKIT' => [ 'key' => 'sveltekit', 'name' => 'SvelteKit', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './build', 'buildRuntime' => 'node-22', @@ -58,7 +58,7 @@ const TEMPLATE_FRAMEWORKS = [ 'NEXTJS' => [ 'key' => 'nextjs', 'name' => 'Next.js', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './.next', 'buildRuntime' => 'node-22', @@ -68,7 +68,7 @@ const TEMPLATE_FRAMEWORKS = [ 'NUXT' => [ 'key' => 'nuxt', 'name' => 'Nuxt', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './.output', 'buildRuntime' => 'node-22', @@ -78,7 +78,7 @@ const TEMPLATE_FRAMEWORKS = [ 'REMIX' => [ 'key' => 'remix', 'name' => 'Remix', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './build', 'buildRuntime' => 'node-22', @@ -88,7 +88,7 @@ const TEMPLATE_FRAMEWORKS = [ 'ASTRO' => [ 'key' => 'astro', 'name' => 'Astro', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './dist', 'buildRuntime' => 'node-22', @@ -108,7 +108,7 @@ const TEMPLATE_FRAMEWORKS = [ 'VITE' => [ 'key' => 'vite', 'name' => 'Vite', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'buildRuntime' => 'node-22', 'adapter' => 'static', @@ -117,7 +117,7 @@ const TEMPLATE_FRAMEWORKS = [ 'REACT' => [ 'key' => 'react', 'name' => 'React', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'buildRuntime' => 'node-22', 'adapter' => 'static', @@ -127,7 +127,7 @@ const TEMPLATE_FRAMEWORKS = [ 'REACT_NATIVE' => [ 'key' => 'react-native', 'name' => 'React Native', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'buildRuntime' => 'node-22', 'adapter' => 'static', @@ -137,7 +137,7 @@ const TEMPLATE_FRAMEWORKS = [ 'TANSTACK_START' => [ 'key' => 'tanstack-start', 'name' => 'TanStack Start', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './dist', 'buildRuntime' => 'node-22', @@ -147,7 +147,7 @@ const TEMPLATE_FRAMEWORKS = [ 'ANGULAR' => [ 'key' => 'angular', 'name' => 'Angular', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'buildRuntime' => 'node-22', 'adapter' => 'static', @@ -157,7 +157,7 @@ const TEMPLATE_FRAMEWORKS = [ 'ANALOG' => [ 'key' => 'analog', 'name' => 'Analog', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'buildRuntime' => 'node-22', 'adapter' => 'ssr', @@ -166,7 +166,7 @@ const TEMPLATE_FRAMEWORKS = [ 'VUE' => [ 'key' => 'vue', 'name' => 'Vue.js', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'buildRuntime' => 'node-22', 'adapter' => 'static', @@ -185,7 +185,7 @@ const TEMPLATE_FRAMEWORKS = [ 'LYNX' => [ 'key' => 'lynx', 'name' => 'Lynx', - 'installCommand' => 'npm install && cd web && npm install && cd ..', + 'installCommand' => 'npm ci && cd web && npm ci && cd ..', 'buildCommand' => 'npm run build && cd web && npm run build && cd ..', 'buildRuntime' => 'node-22', 'adapter' => 'static', @@ -276,7 +276,7 @@ return [ getFramework('VUE', [ 'providerRootDirectory' => './vue/vuepress', 'outputDirectory' => '404.html', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './src/.vuepress/dist', ]), @@ -299,7 +299,7 @@ return [ getFramework('REACT', [ 'providerRootDirectory' => './react/docusaurus', 'outputDirectory' => '404.html', - 'installCommand' => 'npm install', + 'installCommand' => 'npm ci', 'buildCommand' => 'npm run build', 'outputDirectory' => './build', ]), diff --git a/src/Appwrite/Utopia/Response/Model/DetectionFramework.php b/src/Appwrite/Utopia/Response/Model/DetectionFramework.php index 4cdf37bbcf..98fd196b1e 100644 --- a/src/Appwrite/Utopia/Response/Model/DetectionFramework.php +++ b/src/Appwrite/Utopia/Response/Model/DetectionFramework.php @@ -21,7 +21,7 @@ class DetectionFramework extends Detection 'type' => self::TYPE_STRING, 'description' => 'Site Install Command', 'default' => '', - 'example' => 'npm install', + 'example' => 'npm ci', ]) ->addRule('buildCommand', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/DetectionRuntime.php b/src/Appwrite/Utopia/Response/Model/DetectionRuntime.php index 1e63929092..68269200ac 100644 --- a/src/Appwrite/Utopia/Response/Model/DetectionRuntime.php +++ b/src/Appwrite/Utopia/Response/Model/DetectionRuntime.php @@ -27,7 +27,7 @@ class DetectionRuntime extends Detection 'type' => self::TYPE_STRING, 'description' => 'Function install and build commands', 'default' => '', - 'example' => 'npm install && npm run build', + 'example' => 'npm ci && npm run build', ]); } diff --git a/src/Appwrite/Utopia/Response/Model/Framework.php b/src/Appwrite/Utopia/Response/Model/Framework.php index 14d4052133..386bb3a6dd 100644 --- a/src/Appwrite/Utopia/Response/Model/Framework.php +++ b/src/Appwrite/Utopia/Response/Model/Framework.php @@ -39,7 +39,7 @@ class Framework extends Model 'type' => Response::MODEL_FRAMEWORK_ADAPTER, 'description' => 'List of supported adapters.', 'default' => '', - 'example' => [[ 'key' => 'static', 'buildRuntime' => 'node-22', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist' ]], + 'example' => [[ 'key' => 'static', 'buildRuntime' => 'node-22', 'buildCommand' => 'npm run build', 'installCommand' => 'npm ci', 'outputDirectory' => './dist' ]], 'array' => true, ]) ; diff --git a/src/Appwrite/Utopia/Response/Model/FrameworkAdapter.php b/src/Appwrite/Utopia/Response/Model/FrameworkAdapter.php index afbd78eda4..f4b663abec 100644 --- a/src/Appwrite/Utopia/Response/Model/FrameworkAdapter.php +++ b/src/Appwrite/Utopia/Response/Model/FrameworkAdapter.php @@ -20,7 +20,7 @@ class FrameworkAdapter extends Model 'type' => self::TYPE_STRING, 'description' => 'Default command to download dependencies.', 'default' => '', - 'example' => 'npm install', + 'example' => 'npm ci', ]) ->addRule('buildCommand', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Func.php b/src/Appwrite/Utopia/Response/Model/Func.php index 3aea364fe5..f336b0a12c 100644 --- a/src/Appwrite/Utopia/Response/Model/Func.php +++ b/src/Appwrite/Utopia/Response/Model/Func.php @@ -144,7 +144,7 @@ class Func extends Model 'type' => self::TYPE_STRING, 'description' => 'The build command used to build the deployment.', 'default' => '', - 'example' => 'npm install', + 'example' => 'npm ci', ]) ->addRule('version', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Site.php b/src/Appwrite/Utopia/Response/Model/Site.php index 941b6104df..0963a34adc 100644 --- a/src/Appwrite/Utopia/Response/Model/Site.php +++ b/src/Appwrite/Utopia/Response/Model/Site.php @@ -123,7 +123,7 @@ class Site extends Model 'type' => self::TYPE_STRING, 'description' => 'The install command used to install the site dependencies.', 'default' => '', - 'example' => 'npm install', + 'example' => 'npm ci', ]) ->addRule('buildCommand', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/TemplateFramework.php b/src/Appwrite/Utopia/Response/Model/TemplateFramework.php index ae94ca4425..277dd4a31d 100644 --- a/src/Appwrite/Utopia/Response/Model/TemplateFramework.php +++ b/src/Appwrite/Utopia/Response/Model/TemplateFramework.php @@ -26,7 +26,7 @@ class TemplateFramework extends Model 'type' => self::TYPE_STRING, 'description' => 'The install command used to install the dependencies.', 'default' => '', - 'example' => 'npm install', + 'example' => 'npm ci', ]) ->addRule('buildCommand', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/TemplateRuntime.php b/src/Appwrite/Utopia/Response/Model/TemplateRuntime.php index c98a59789d..202b31fa94 100644 --- a/src/Appwrite/Utopia/Response/Model/TemplateRuntime.php +++ b/src/Appwrite/Utopia/Response/Model/TemplateRuntime.php @@ -20,7 +20,7 @@ class TemplateRuntime extends Model 'type' => self::TYPE_STRING, 'description' => 'The build command used to build the deployment.', 'default' => '', - 'example' => 'npm install', + 'example' => 'npm ci', ]) ->addRule('entrypoint', [ 'type' => self::TYPE_STRING, diff --git a/tests/e2e/Services/VCS/VCSConsoleClientTest.php b/tests/e2e/Services/VCS/VCSConsoleClientTest.php index b1b7e9a42a..09445bdc51 100644 --- a/tests/e2e/Services/VCS/VCSConsoleClientTest.php +++ b/tests/e2e/Services/VCS/VCSConsoleClientTest.php @@ -180,7 +180,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(200, $framework['headers']['status-code']); $this->assertEquals($framework['body']['framework'], 'sveltekit'); - $this->assertEquals($framework['body']['installCommand'], 'npm install'); + $this->assertEquals($framework['body']['installCommand'], 'npm ci'); $this->assertEquals($framework['body']['buildCommand'], 'npm run build'); $this->assertEquals($framework['body']['outputDirectory'], './build'); @@ -195,7 +195,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(200, $framework['headers']['status-code']); $this->assertEquals($framework['body']['framework'], 'astro'); - $this->assertEquals($framework['body']['installCommand'], 'npm install'); + $this->assertEquals($framework['body']['installCommand'], 'npm ci'); $this->assertEquals($framework['body']['buildCommand'], 'npm run build'); $this->assertEquals($framework['body']['outputDirectory'], './dist'); @@ -210,7 +210,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(200, $framework['headers']['status-code']); $this->assertEquals($framework['body']['framework'], 'remix'); - $this->assertEquals($framework['body']['installCommand'], 'npm install'); + $this->assertEquals($framework['body']['installCommand'], 'npm ci'); $this->assertEquals($framework['body']['buildCommand'], 'npm run build'); $this->assertEquals($framework['body']['outputDirectory'], './build');