@trenskow/reader 0.1.2 → 0.1.4
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/lib/interview.js +3 -3
- package/package.json +1 -1
package/lib/interview.js
CHANGED
|
@@ -40,7 +40,7 @@ const interview = async (schema, { spacing = 0, input = process.stdin, output =
|
|
|
40
40
|
|
|
41
41
|
const keyPath = allKeyPaths[idx];
|
|
42
42
|
|
|
43
|
-
keyd(result).set(keyPath, await interview(keyPaths(schema).get(keyPath), { spacing }));
|
|
43
|
+
keyd(result).set(keyPath, await interview(keyPaths(schema).get(keyPath), { spacing, strings }));
|
|
44
44
|
|
|
45
45
|
if (idx < allKeyPaths.length - 1) {
|
|
46
46
|
for (let i = 0; i < spacing; i++) {
|
|
@@ -60,7 +60,7 @@ const interview = async (schema, { spacing = 0, input = process.stdin, output =
|
|
|
60
60
|
|
|
61
61
|
while (true) {
|
|
62
62
|
|
|
63
|
-
const item = await interview(schema.items);
|
|
63
|
+
const item = await interview(schema.items, { spacing, strings });
|
|
64
64
|
|
|
65
65
|
if (!item)
|
|
66
66
|
break;
|
|
@@ -84,7 +84,7 @@ const interview = async (schema, { spacing = 0, input = process.stdin, output =
|
|
|
84
84
|
print.tty.nn('\x1b[0m');
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
return await isvalid(await question(`${schema.label}${schema.required ? ` ${strings?.required || 'required'}` : ''}: `, {
|
|
87
|
+
return await isvalid(await question(`${schema.label}${schema.required ? ` ${strings?.required || '(required)'}` : ''}: `, {
|
|
88
88
|
defaultValue: schema.default,
|
|
89
89
|
input,
|
|
90
90
|
output,
|