@madgex/fert 7.1.1 → 7.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -47,7 +47,7 @@ export async function createDevServer(options = {}) {
|
|
|
47
47
|
await buildTokens(fertConfig);
|
|
48
48
|
|
|
49
49
|
const results = await runValidators([brandJsonValidator], { rootDir: fertConfig.rootDir, options });
|
|
50
|
-
reportResults(results, rootDir);
|
|
50
|
+
reportResults(results, fertConfig.rootDir);
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
const configPath = path.resolve(fertConfigDir, FERT_CONFIG_FILENAME);
|
|
@@ -45,9 +45,9 @@ export function extractTokenPaths(obj, prefix = '') {
|
|
|
45
45
|
*/
|
|
46
46
|
export function resolveToFinalValue(rawValue, tokens) {
|
|
47
47
|
if (typeof rawValue !== 'string' || !rawValue.includes('{')) return rawValue;
|
|
48
|
-
const resolved = resolveReferences(rawValue, tokens
|
|
49
|
-
if (resolved) {
|
|
50
|
-
return resolveToFinalValue(resolved, tokens);
|
|
48
|
+
const resolved = resolveReferences(rawValue, tokens);
|
|
49
|
+
if (resolved !== undefined && typeof resolved === 'object' && '$value' in resolved) {
|
|
50
|
+
return resolveToFinalValue(resolved.$value, tokens, { usesDtcg: true });
|
|
51
51
|
}
|
|
52
52
|
return resolved;
|
|
53
53
|
}
|