@@ -258,7 +258,7 @@ public function connectionInfo()
258258 );
259259
260260 // Can only Use Git on dev/multidev environments
261- if (!in_array ($ this ->id , ['test ' , 'live ' ,])) {
261+ if (!in_array ($ this ->id , ['test ' , 'live ' ,]) && ! $ this -> isEvcsSite () ) {
262262 $ git_info = $ this ->gitConnectionInfo ();
263263 $ info = array_merge (
264264 array_combine (
@@ -271,6 +271,13 @@ public function connectionInfo()
271271 );
272272 }
273273
274+ if (empty ($ info )) {
275+ throw new TerminusException (
276+ 'No connection information available for {env} environment for this site. ' ,
277+ ['env ' => $ this ->id ,]
278+ );
279+ }
280+
274281 return $ info ;
275282 }
276283
@@ -281,6 +288,10 @@ public function connectionInfo()
281288 */
282289 public function cacheserverConnectionInfo ()
283290 {
291+ if ($ this ->getSite ()->isNodejs ()) {
292+ // No database for Node.js sites
293+ return [];
294+ }
284295 $ env_vars = $ this ->fetchEnvironmentVars ();
285296 $ port = $ env_vars ['CACHE_PORT ' ] ?? null ;
286297 $ password = $ env_vars ['CACHE_PASSWORD ' ] ?? null ;
@@ -327,6 +338,10 @@ public function fetchEnvironmentVars(): array
327338 */
328339 public function databaseConnectionInfo ()
329340 {
341+ if ($ this ->getSite ()->isNodejs ()) {
342+ // No database for Node.js sites
343+ return [];
344+ }
330345 $ env_vars = $ this ->fetchEnvironmentVars ();
331346 $ domain = "dbserver. {$ this ->id }. {$ this ->getSite ()->id }.drush.in " ;
332347 $ port = $ env_vars ['DB_PORT ' ] ?? null ;
@@ -965,6 +980,10 @@ public function setHttpsCertificate($certificate = [])
965980 */
966981 public function sftpConnectionInfo ()
967982 {
983+ if ($ this ->isEvcsSite ()) {
984+ // No SFTP for EVCS sites
985+ return [];
986+ }
968987 $ site = $ this ->getSite ();
969988 if (!empty ($ ssh_host = $ this ->getConfig ()->get ('ssh_host ' ))) {
970989 $ username = "appserver. {$ this ->id }. {$ site ->id }" ;
@@ -1021,12 +1040,18 @@ function ($domain) {
10211040 $ success = false ;
10221041 $ lastError = null ;
10231042
1043+ $ wakeUrl = "https:// {$ domain ->id }/pantheon_healthcheck " ;
1044+ if ($ this ->getSite ()->isNodejs ()) {
1045+ // For Node.js sites, we use the root path for the health check.
1046+ $ wakeUrl = "https:// {$ domain ->id }" ;
1047+ }
1048+
10241049 while ($ attempt < $ maxRetries && !$ success ) {
10251050 $ lastError = null ;
10261051 $ attempt ++;
10271052 try {
10281053 $ response = $ this ->request ()->request (
1029- " https:// { $ domain -> id } /pantheon_healthcheck "
1054+ $ wakeUrl ,
10301055 );
10311056 $ success = ($ response ['status_code ' ] === 200 );
10321057 if ($ success ) {
0 commit comments