jsir 1.2.1 → 1.2.3

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/cmd/ooa.js +7 -4
  2. package/package.json +1 -1
package/cmd/ooa.js CHANGED
@@ -361,7 +361,11 @@ function _nextLine(callback, preStr, hidden, resolve) {
361
361
 
362
362
  _rl._writeToOutput = function _writeToOutput(stringToWrite){
363
363
  if(hidden && stringToWrite.indexOf("\n") === -1 && stringToWrite !== promitStr){
364
- _rl.output.write("*");
364
+ if (stringToWrite.indexOf(promitStr) === -1) {
365
+ _rl.output.write("*");
366
+ } else {
367
+ _rl.output.write(promitStr + stringToWrite.replace(promitStr, '').replace(/[\s\S]/g, '*'));
368
+ }
365
369
  } else {
366
370
  _rl.output.write(stringToWrite);
367
371
  }
@@ -389,10 +393,9 @@ function _nextLine(callback, preStr, hidden, resolve) {
389
393
  let promitStr = (preStr
390
394
  || ((callback && callback !== wrapperInput) ? "-> ":"")
391
395
  || [Object.values(global.$tips).filter(i => String(i)).join(','), repoTip].filter(i => i).join('-') + `> `)
392
- _rl.setPrompt(promitStr)
393
- process.stdout.write('\x1B[32m')
396
+ promitStr = '\x1B[32m' + promitStr + '\x1B[39m'
397
+ _rl.setPrompt(promitStr);
394
398
  _rl.prompt()
395
- process.stdout.write('\x1B[39m')
396
399
  }
397
400
 
398
401
  async function nextText(callback, preStr, hidden) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsir",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {