topkat-utils 1.3.15 → 1.3.16

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/backend.ts CHANGED
@@ -11,7 +11,7 @@ export async function execWaitForOutput(
11
11
  /** Whenever to log output to the console, choose false to execute the process silently. Default: true */
12
12
  logOutputStream: boolean
13
13
  /** when the output contain this string or matches this regexp, process is considered done. Else it will wait for exit */
14
- stringOrRegexpToSearchForConsideringDone: string
14
+ stringOrRegexpToSearchForConsideringDone: string | RegExp
15
15
  /** timeout before killing process in seconds. Put -1 or 0 de disable. Default: 20 */
16
16
  nbSecondsBeforeKillingProcess: number
17
17
  /** { a: 1000, b: 2000 } { keyCode: sendAfterXms }; Eg: the key "keyCode" will be sent to terminal after "sendAfterXms" milliseconds */
@@ -71,7 +71,7 @@ export async function execWaitForOutput(
71
71
  }, keyCodeToSend[keyCode])
72
72
  }
73
73
  })
74
- } catch (error) {
74
+ } catch (_) {
75
75
  if (errorHandle === 'log') C.error(`Something went wrong using this command: ${command}\nPlease check this log:\n${outputStream}`)
76
76
  else throw `Something went wrong using this command: ${command}\nPlease check this log:\n${outputStream}`
77
77
  }
package/dist/backend.d.ts CHANGED
@@ -4,7 +4,7 @@ export declare function execWaitForOutput(command: string, config?: Partial<{
4
4
  /** Whenever to log output to the console, choose false to execute the process silently. Default: true */
5
5
  logOutputStream: boolean;
6
6
  /** when the output contain this string or matches this regexp, process is considered done. Else it will wait for exit */
7
- stringOrRegexpToSearchForConsideringDone: string;
7
+ stringOrRegexpToSearchForConsideringDone: string | RegExp;
8
8
  /** timeout before killing process in seconds. Put -1 or 0 de disable. Default: 20 */
9
9
  nbSecondsBeforeKillingProcess: number;
10
10
  /** { a: 1000, b: 2000 } { keyCode: sendAfterXms }; Eg: the key "keyCode" will be sent to terminal after "sendAfterXms" milliseconds */
package/dist/backend.js CHANGED
@@ -54,7 +54,7 @@ async function execWaitForOutput(command, config = {}) {
54
54
  }
55
55
  });
56
56
  }
57
- catch (error) {
57
+ catch (_) {
58
58
  if (errorHandle === 'log')
59
59
  logger_utils_1.C.error(`Something went wrong using this command: ${command}\nPlease check this log:\n${outputStream}`);
60
60
  else
@@ -1 +1 @@
1
- {"version":3,"file":"backend.js","sourceRoot":"","sources":["../backend.ts"],"names":[],"mappings":";;;AAEA,qDAAsC;AACtC,iDAAkD;AAGlD,qFAAqF;AAC9E,KAAK,UAAU,iBAAiB,CACnC,OAAe,EACf,SAAS,EAiBP;IAGF,IAAI,YAAY,GAAG,EAAE,CAAA;IACrB,IAAI,WAAW,CAAA;IAEf,MAAM,EAAE,6BAA6B,GAAG,EAAE,EAAE,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE,eAAe,GAAG,IAAI,EAAE,wCAAwC,EAAE,aAAa,GAAG,EAAE,EAAE,cAAc,EAAE,GAAG,MAAM,CAAA;IAEpN,IAAI;QACA,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,EAAE,GAAG,6BAA6B,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE;gBAC3D,gBAAC,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAA;gBACtC,MAAM,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAA;YACzC,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;YAEpD,MAAM,QAAQ,GAAG,IAAA,oBAAI,EAAC,OAAO,EAAE,WAAW,CAAC,CAAA;YAC3C,IAAI,cAAc;gBAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;YAC5C,MAAM,OAAO,GAAG,GAAG,EAAE;gBACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;gBACxB,YAAY,CAAC,EAAE,CAAC,CAAA;gBAChB,GAAG,CAAC,YAAY,CAAC,CAAA;YACrB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