mobilestacks 0.1.16 → 0.1.17

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.
package/dist/cli/index.js CHANGED
@@ -65,14 +65,14 @@ tasks_definitions_1.TaskDefinitions.getInstance().getAllTasks().forEach(task =>
65
65
  });
66
66
  cmd.action(async (opts) => {
67
67
  try {
68
- // Prompt for missing required params
69
- const missing = task.params.filter(p => p.required !== false && !opts[p.name]);
70
- if (missing.length > 0) {
71
- const answers = await inquirer_1.default.prompt(missing.map(p => ({
68
+ const argsString = process.argv.slice(3).join(' ');
69
+ const unprovided = task.params.filter(p => !argsString.includes(`--${p.name}`));
70
+ if (unprovided.length > 0 && process.stdout.isTTY) {
71
+ const answers = await inquirer_1.default.prompt(unprovided.map(p => ({
72
72
  type: p.type === 'boolean' ? 'confirm' : 'input',
73
73
  name: p.name,
74
74
  message: p.description,
75
- default: p.defaultValue
75
+ default: opts[p.name] !== undefined ? opts[p.name] : p.defaultValue
76
76
  })));
77
77
  Object.assign(opts, answers);
78
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobilestacks",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Professional Task Runner & CLI for the Stacks Blockchain",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",