@mono-labs/cli 0.0.234 → 0.0.236

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.
@@ -1,18 +1,29 @@
1
1
  // Shared mutable key/value store for build-process commands.
2
2
  // Extracts dynamic values from preactions and holds defaults from options.
3
3
 
4
+ import { testFlag } from './testflag.js';
5
+
4
6
  const dataLayer = {};
5
7
 
6
8
  export function setData(key, value) {
9
+ if (testFlag) {
10
+ console.log(`→ dataLayer set: ${key} = ${value}`);
11
+ }
7
12
  if (value !== undefined) dataLayer[key] = value;
8
13
  }
9
14
 
10
15
  export function mergeData(obj = {}) {
16
+ if (testFlag) {
17
+ console.log(`→ dataLayer mergeData: ${JSON.stringify(obj)}`);
18
+ }
11
19
  Object.entries(obj).forEach(([k, v]) => setData(k, v));
12
20
  return dataLayer;
13
21
  }
14
22
 
15
23
  export function getData(key) {
24
+ if (testFlag) {
25
+ console.log(`→ dataLayer get: ${key}`);
26
+ }
16
27
  return key ? dataLayer[key] : dataLayer;
17
28
  }
18
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-labs/cli",
3
- "version": "0.0.234",
3
+ "version": "0.0.236",
4
4
  "description": "A CLI tool for building and deploying projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types.d.ts",