From 9fbca90ad72ae7b92b75c94985ea6589738b6a2e Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Thu, 5 Nov 2026 17:59:15 +0100 Subject: [PATCH] Fix deployments of applications with WebSockets The `wss://` line in the output of `serverless info` is not valid YAML. --- src/Components/ServerlessFramework.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/ServerlessFramework.php b/src/Components/ServerlessFramework.php index 672ea59..04fe254 100644 --- a/src/Components/ServerlessFramework.php +++ b/src/Components/ServerlessFramework.php @@ -183,8 +183,8 @@ private function retrieveOutputs(string $oslsPackage, string $environment, array } // Remove API Gateway URLs with invalid YAML content from the output, - // i.e. lines containing ` ANY - ` or ` GET - ` or ` POST - ` or ` PUT - ` or ` DELETE - ` or ` PATCH - ` or ` OPTIONS - ` or ` HEAD - ` - $infoOutput = preg_replace('/^ {2}(ANY|GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD) - .*\n/m', '', $infoOutput); + // i.e. lines containing ` ANY - ` or ` GET - ` or ` POST - ` or ` PUT - ` or ` DELETE - ` or ` PATCH - ` or ` OPTIONS - ` or ` HEAD - ` or ` wss://` + $infoOutput = preg_replace('/^ {2}((ANY|GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD) - |wss:\/\/).*\n/m', '', $infoOutput); if (! $infoOutput) { throw new Exception("Impossible to parse the output of 'serverless info':\n$infoOutput"); }