Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/constants/ingestion/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ 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-]+)+\\/ShapeMetadata\\.shp$',
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-]+)+\\/Product\\.shp$',
pattern: '^(\\/?[\\w-]+)(\\/[\\w-]+)*\\/Product\\.shp$',
description: 'Valid product shapefile file path, must be end with /Product.shp',
},
horizontalAccuracyCE90: {
Expand Down
4 changes: 2 additions & 2 deletions src/schemas/ingestion/inputFiles.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down