fix: loosen regex requirements for config keys

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
aramissennyeydd
2025-06-10 11:18:21 -04:00
parent eef0e83a0d
commit f1f21b8cd7
2 changed files with 2 additions and 2 deletions
@@ -85,7 +85,7 @@ export class EnvConfigSource implements ConfigSource {
const ENV_PREFIX = 'APP_CONFIG_';
// Update the same pattern in config package if this is changed
const CONFIG_KEY_PART_PATTERN = /^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;
const CONFIG_KEY_PART_PATTERN = /^[\w-_]+$/i;
/**
* Read runtime configuration from the environment.
+1 -1
View File
@@ -18,7 +18,7 @@ import { JsonValue, JsonObject } from '@backstage/types';
import { AppConfig, Config } from './types';
// Update the same pattern in config-loader package if this is changed
const CONFIG_KEY_PART_PATTERN = /^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;
const CONFIG_KEY_PART_PATTERN = /^[\w-_]+$/i;
function isObject(value: JsonValue | undefined): value is JsonObject {
return typeof value === 'object' && value !== null && !Array.isArray(value);