@mono-labs/cli 0.0.83 → 0.0.85
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.
|
@@ -24,9 +24,17 @@ export function replaceTokens(str) {
|
|
|
24
24
|
console.log('replaceTokens input:', str);
|
|
25
25
|
if (typeof str !== 'string') return str;
|
|
26
26
|
console.log('dataLayer:', dataLayer);
|
|
27
|
-
const rVal = str.replace(/\$\{([^}]+)\}/g, (m, k) =>
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const rVal = str.replace(/\$\{([^}]+)\}/g, (m, k) => {
|
|
28
|
+
console.log('token:', k);
|
|
29
|
+
console.log('match:', m);
|
|
30
|
+
console.log('hasData:', hasData(k));
|
|
31
|
+
if (hasData(k)) {
|
|
32
|
+
console.log('getData:', getData(k));
|
|
33
|
+
return String(getData(k));
|
|
34
|
+
} else {
|
|
35
|
+
return m;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
30
38
|
console.log('rVal:', rVal);
|
|
31
39
|
return rVal;
|
|
32
40
|
}
|
|
@@ -18,7 +18,7 @@ export function runForeground(cmd, envObj = {}, options = {}) {
|
|
|
18
18
|
let lastLine = '';
|
|
19
19
|
let buffer = '';
|
|
20
20
|
|
|
21
|
-
const child = spawn(
|
|
21
|
+
const child = spawn(newCmd, {
|
|
22
22
|
shell: true,
|
|
23
23
|
env: { ...process.env, ...envObj },
|
|
24
24
|
stdio: ['inherit', 'pipe', 'pipe'],
|