(tableFolderSubpath: string)
| 200 | * - Cannot contain "../". |
| 201 | */ |
| 202 | export function validateIcebergConfigTableFolderSubpath(tableFolderSubpath: string): void { |
| 203 | if (!/^[a-zA-Z0-9][a-zA-Z0-9-._/]{1,220}[a-zA-Z0-9]$/.test(tableFolderSubpath) || tableFolderSubpath.includes("..")) { |
| 204 | throw new Error( |
| 205 | "Invalid input. Must start and end with a letter or number, contain only letters (a-z, A-Z), numbers, hyphens (-), underscores (_), periods (.), and forward slashes (/). The sequence '..' is also disallowed." |
| 206 | ); |
| 207 | } |
| 208 | if (tableFolderSubpath.includes("./") || tableFolderSubpath.includes("../")) { |
| 209 | throw new Error("Input cannot contain './' or '../'."); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | export const ICEBERG_BUCKET_NAME_HINT = "The bucket name must comply with https://cloud.google.com/storage/docs/buckets#naming. If you do not want to provide a workflow-level default bucket name, leave this input empty.\n"; |
| 214 | export const ICEBERG_TABLE_FOLDER_ROOT_HINT = "Table folder root must start and end with a letter or a number. It can only contain letters, numbers, hyphens, underscores and periods. If you do not want to provide a workflow_level default table folder root, leave this input empty.\n" |
no test coverage detected