@seedvault/cli 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/dist/sv.js +11 -3
  2. package/package.json +1 -1
package/dist/sv.js CHANGED
@@ -3,7 +3,8 @@
3
3
 
4
4
  // src/commands/init.ts
5
5
  import * as readline from "readline/promises";
6
- import { stdin, stdout } from "process";
6
+ import { stdout } from "process";
7
+ import * as fs from "fs";
7
8
 
8
9
  // src/config.ts
9
10
  import { join, resolve, relative, isAbsolute } from "path";
@@ -271,7 +272,14 @@ async function init(args) {
271
272
  console.log(` Token: ${result.token}`);
272
273
  return;
273
274
  }
274
- const rl = readline.createInterface({ input: stdin, output: stdout });
275
+ let input;
276
+ try {
277
+ const fd = fs.openSync("/dev/tty", "r");
278
+ input = fs.createReadStream("", { fd });
279
+ } catch {
280
+ input = process.stdin;
281
+ }
282
+ const rl = readline.createInterface({ input, output: stdout });
275
283
  try {
276
284
  console.log(`Seedvault Setup
277
285
  `);
@@ -2959,7 +2967,7 @@ async function main() {
2959
2967
  return;
2960
2968
  }
2961
2969
  if (cmd === "--version" || cmd === "-v") {
2962
- console.log("0.2.0");
2970
+ console.log("0.2.1");
2963
2971
  return;
2964
2972
  }
2965
2973
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seedvault/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "sv": "bin/sv.mjs"