@mono-labs/cli 0.0.70 → 0.0.72

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.
@@ -46,10 +46,35 @@ export function buildCommands(files) {
46
46
 
47
47
  current.action(async (arg, cmd) => {
48
48
  console.log('optionsData:', optionsData);
49
- const optionVals = cmd.opts ? cmd.opts() : cmd;
49
+ let envDefaults = {};
50
+ optionsData
51
+ .filter((item) => item.default !== undefined)
52
+ .forEach((item) => {
53
+ envDefaults[item] = item.default;
54
+ });
55
+ console.log('optionsData:', optionsData);
56
+ console.log('envDefaults', envDefaults);
57
+ const optionVals = { ...(cmd.opts ? cmd.opts() : cmd) };
50
58
  Object.keys(optionVals).forEach((k) => {
51
59
  optionVals[k] = verifyOptionValue(k, optionVals[k], optionsData);
52
60
  });
61
+
62
+ console.log('envDefaults', envDefaults);
63
+ const test = {
64
+ type: {
65
+ description: 'Build to target specific platform',
66
+ default: 'backend',
67
+ options: ['core', 'backend'],
68
+ type: 'string',
69
+ },
70
+ dev: { description: 'Run in dev mode', shortcut: 'd' },
71
+ region: {
72
+ shortcut: 'r',
73
+ type: 'string',
74
+ description: 'Set region',
75
+ default: 'us-east-2',
76
+ },
77
+ };
53
78
  const argVal = arg || configObject.argument?.default;
54
79
  console.log('optionVals:', optionVals);
55
80
  console.log('argVal:', argVal);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-labs/cli",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "description": "A CLI tool for building and deploying projects",
5
5
  "type": "module",
6
6
  "main": "index.js",