Spring config file patterns: application(-profile)?.{yml,yaml,properties} + * bootstrap variants. Matches the basename, not the path, so a project that * vendors `application.yml` under `src/main/resources` and one under `src/test/ * resources` are both picked up.
(filePath: string)
| 335 | * vendors `application.yml` under `src/main/resources` and one under `src/test/ |
| 336 | * resources` are both picked up. */ |
| 337 | function isSpringConfigFile(filePath: string): boolean { |
| 338 | const base = filePath.split('/').pop() ?? ''; |
| 339 | return /^(application|bootstrap)(-[\w.-]+)?\.(yml|yaml|properties)$/i.test(base); |
| 340 | } |
| 341 | |
| 342 | /** |
| 343 | * Parse a Spring config file (YAML or .properties) and emit one `constant` |