From 4401734056c91251aa401ae763e39c571dcbb74a Mon Sep 17 00:00:00 2001 From: vitaligi <54726763+vitaligi@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:57:41 +0200 Subject: [PATCH 1/3] fix!: regex metadata and product --- src/constants/ingestion/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants/ingestion/constants.ts b/src/constants/ingestion/constants.ts index 715883b..c30b6e9 100644 --- a/src/constants/ingestion/constants.ts +++ b/src/constants/ingestion/constants.ts @@ -38,12 +38,12 @@ export const INGESTION_VALIDATIONS = { }, metadataShapefileFilePath: { // eslint-disable-next-line no-useless-escape - pattern: '^(\\/[\\w-]+)+\\/ShapeMetadata\\.shp$', + pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/ShapeMetadata\\.shp$', description: 'Valid metadata shapefile file path, must be end with /ShapeMetadata.shp', }, productShapefileFilePath: { // eslint-disable-next-line no-useless-escape - pattern: '^(\\/[\\w-]+)+\\/Product\\.shp$', + pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/Product\\.shp$', description: 'Valid product shapefile file path, must be end with /Product.shp', }, horizontalAccuracyCE90: { From 1c576c84dbe6367a475965174c305862e0f4a6d9 Mon Sep 17 00:00:00 2001 From: vitaligi <54726763+vitaligi@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:58:56 +0200 Subject: [PATCH 2/3] fix!: metadata and product constants properties rename --- src/constants/ingestion/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants/ingestion/constants.ts b/src/constants/ingestion/constants.ts index c30b6e9..c9f3c9c 100644 --- a/src/constants/ingestion/constants.ts +++ b/src/constants/ingestion/constants.ts @@ -36,12 +36,12 @@ export const INGESTION_VALIDATIONS = { pattern: '^((\\/[\\w-]+)+)\\/([^\\/][\\wא-ת\\.-]+)\\.gpkg$', description: 'Valid gpkg file path, file name must end with .gpkg', }, - metadataShapefileFilePath: { + 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', }, - productShapefileFilePath: { + 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', From c11d52f278be71a31084082ccacf59ae69c72e9f Mon Sep 17 00:00:00 2001 From: vitaligi <54726763+vitaligi@users.noreply.github.com> Date: Wed, 29 Oct 2025 18:02:24 +0200 Subject: [PATCH 3/3] fix: update breaked schemas definitions --- src/schemas/ingestion/inputFiles.schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemas/ingestion/inputFiles.schema.ts b/src/schemas/ingestion/inputFiles.schema.ts index 9b555f2..82afd52 100644 --- a/src/schemas/ingestion/inputFiles.schema.ts +++ b/src/schemas/ingestion/inputFiles.schema.ts @@ -8,14 +8,14 @@ export const gpkgFileNameSchema = z export const metadataShapefilePathSchema = z .string() - .regex(new RegExp(INGESTION_VALIDATIONS.metadataShapefileFilePath.pattern), { + .regex(new RegExp(INGESTION_VALIDATIONS.metadataShapefilePath.pattern), { message: 'Metadata shape file path must be a valid shapefile path ending with "/ShapeMetadata.shp"', }) .describe('metadataShapefileSchema'); export const productShapefilePathSchema = z .string() - .regex(new RegExp(INGESTION_VALIDATIONS.productShapefileFilePath.pattern), { + .regex(new RegExp(INGESTION_VALIDATIONS.productShapefilePath.pattern), { message: 'Product file path must be a valid shapefile path ending with "/Product.shp"', }) .describe('productShapefilePathSchema');