Skip to content

Commit 6411c2c

Browse files
Merge pull request #26 from contentstack/CL-1573
fix: support for dynamic paths on launch cloud functions by restoring the original validation logic
2 parents 7927f0f + 89e5ce0 commit 6411c2c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/util/cloud-function/cloud-functions-validator.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ export class CloudFunctionsValidator {
4848
}
4949

5050
private hasInvalidFilepathNaming(filepath: string): boolean {
51-
const validFilePathRegex = new RegExp(
52-
'^(\\/[-a-z\\d%_.~+]*)*' + // path
53-
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
54-
'(\\#[-a-z\\d_]*)?$',
55-
);
51+
const validFilePathRegex = /^(\[[\w-]+\]|[\w-]+|\/)+$/;
5652

5753
const matchResult = filepath.match(validFilePathRegex);
5854
return matchResult === null;

0 commit comments

Comments
 (0)