diff --git a/server/src/server.ts b/server/src/server.ts index 4ae60812..27644c3a 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -145,11 +145,11 @@ function isCloudFormation(template: string, filename: string): Boolean { return true; } if (/\n?"?Resources"?\s*:/.exec(template)) { - if (/"?Type"?\s*:\s*"?'?(AWS|Alexa|Custom)::/.exec(template)) { + if (/"?Type"?\s*:\s*"?'?[a-zA-Z0-9]{2,64}::[a-zA-Z0-9]{2,64}/.exec(template)) { // filter out serverless.io templates if (!(/\nresources:/.exec(template) && /\nprovider:/.exec(template))) { connection.console.log("Determined this file is a CloudFormation Template. " + filename + - ". Found 'Resources' and 'Type: (AWS|Alexa|Custom)::'"); + ". Found 'Resources' and 'Type: [a-zA-Z0-9]{2,64}::[a-zA-Z0-9]{2,64}'"); return true; } }