From a4ec62c00cc65c97a7250e17bf87f340424d0038 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 30 Oct 2025 11:15:08 +0200 Subject: [PATCH 1/3] fix: changed gpkg file path regex pattern --- src/constants/ingestion/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/ingestion/constants.ts b/src/constants/ingestion/constants.ts index c9f3c9c..d019ab3 100644 --- a/src/constants/ingestion/constants.ts +++ b/src/constants/ingestion/constants.ts @@ -33,7 +33,7 @@ export const INGESTION_VALIDATIONS = { description: 'Classification value between 0 and 100', }, gpkgfileName: { - pattern: '^((\\/[\\w-]+)+)\\/([^\\/][\\wא-ת\\.-]+)\\.gpkg$', + pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/[\\wא-ת\.-]+\\.gpkg$', description: 'Valid gpkg file path, file name must end with .gpkg', }, metadataShapefilePath: { From 56b373569427ce31ee55d2c62c8efc93a9406fdc Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 30 Oct 2025 11:35:58 +0200 Subject: [PATCH 2/3] fix: escaped in gpkg file path regex pattern --- src/constants/ingestion/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/ingestion/constants.ts b/src/constants/ingestion/constants.ts index d019ab3..d2fbd5b 100644 --- a/src/constants/ingestion/constants.ts +++ b/src/constants/ingestion/constants.ts @@ -33,7 +33,7 @@ export const INGESTION_VALIDATIONS = { description: 'Classification value between 0 and 100', }, gpkgfileName: { - pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/[\\wא-ת\.-]+\\.gpkg$', + pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/[\\wא-ת\\.-]+\\.gpkg$', description: 'Valid gpkg file path, file name must end with .gpkg', }, metadataShapefilePath: { From cf7297d9a70746af2fcb38e32eaa97e4d5559b3b Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 30 Oct 2025 11:37:02 +0200 Subject: [PATCH 3/3] fix: removed eslint ignore from regex pattern --- src/constants/ingestion/constants.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/constants/ingestion/constants.ts b/src/constants/ingestion/constants.ts index d2fbd5b..500481b 100644 --- a/src/constants/ingestion/constants.ts +++ b/src/constants/ingestion/constants.ts @@ -37,12 +37,10 @@ export const INGESTION_VALIDATIONS = { description: 'Valid gpkg file path, file name must end with .gpkg', }, metadataShapefilePath: { - // eslint-disable-next-line no-useless-escape pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/ShapeMetadata\\.shp$', description: 'Valid metadata shapefile file path, must be end with /ShapeMetadata.shp', }, productShapefilePath: { - // eslint-disable-next-line no-useless-escape pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/Product\\.shp$', description: 'Valid product shapefile file path, must be end with /Product.shp', },