@ls-stack/utils 3.40.0 → 3.42.0

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 (159) hide show
  1. package/dist/arrayUtils.d.cts +70 -57
  2. package/dist/arrayUtils.d.ts +70 -57
  3. package/dist/assertions.d.cts +128 -117
  4. package/dist/assertions.d.ts +128 -117
  5. package/dist/asyncQueue.cjs +117 -112
  6. package/dist/asyncQueue.d.cts +217 -215
  7. package/dist/asyncQueue.d.ts +217 -215
  8. package/dist/asyncQueue.js +117 -112
  9. package/dist/awaitDebounce.d.cts +26 -23
  10. package/dist/awaitDebounce.d.ts +26 -23
  11. package/dist/cache.cjs +2 -1
  12. package/dist/cache.d.cts +15 -9
  13. package/dist/cache.d.ts +15 -9
  14. package/dist/cache.js +2 -1
  15. package/dist/{chunk-ADM37GSC.js → chunk-7L4KCZJJ.js} +12 -10
  16. package/dist/{chunk-KW55OTUG.js → chunk-B3KFV2MH.js} +2 -2
  17. package/dist/chunk-GMJTLFM6.js +60 -0
  18. package/dist/{chunk-GHAQOUA6.js → chunk-Y45CE75W.js} +22 -1
  19. package/dist/concurrentCalls.d.cts +8 -4
  20. package/dist/concurrentCalls.d.ts +8 -4
  21. package/dist/concurrentCalls.js +1 -1
  22. package/dist/debounce.d.cts +12 -20
  23. package/dist/debounce.d.ts +12 -20
  24. package/dist/dedent.d.cts +31 -31
  25. package/dist/dedent.d.ts +31 -31
  26. package/dist/deepEqual.d.cts +10 -9
  27. package/dist/deepEqual.d.ts +10 -9
  28. package/dist/filterObjectOrArrayKeys.d.cts +44 -19
  29. package/dist/filterObjectOrArrayKeys.d.ts +44 -19
  30. package/dist/getAutoIncrementId.d.cts +25 -23
  31. package/dist/getAutoIncrementId.d.ts +25 -23
  32. package/dist/getCompositeKey.d.cts +2 -1
  33. package/dist/getCompositeKey.d.ts +2 -1
  34. package/dist/getValueStableKey.d.cts +4 -3
  35. package/dist/getValueStableKey.d.ts +4 -3
  36. package/dist/mutationUtils.d.cts +2 -2
  37. package/dist/mutationUtils.d.ts +2 -2
  38. package/dist/objUtils.cjs +51 -2
  39. package/dist/objUtils.d.cts +8 -3
  40. package/dist/objUtils.d.ts +8 -3
  41. package/dist/objUtils.js +11 -3
  42. package/dist/parallelAsyncCalls.cjs +2 -1
  43. package/dist/parallelAsyncCalls.d.cts +5 -4
  44. package/dist/parallelAsyncCalls.d.ts +5 -4
  45. package/dist/parallelAsyncCalls.js +2 -1
  46. package/dist/retryOnError.d.cts +23 -20
  47. package/dist/retryOnError.d.ts +23 -20
  48. package/dist/runShellCmd.d.cts +40 -40
  49. package/dist/runShellCmd.d.ts +40 -40
  50. package/dist/safeJson.d.cts +6 -2
  51. package/dist/safeJson.d.ts +6 -2
  52. package/dist/saferTyping.d.cts +21 -14
  53. package/dist/saferTyping.d.ts +21 -14
  54. package/dist/shallowEqual.d.cts +1 -1
  55. package/dist/shallowEqual.d.ts +1 -1
  56. package/dist/stringUtils.cjs +2 -2
  57. package/dist/stringUtils.d.cts +6 -7
  58. package/dist/stringUtils.d.ts +6 -7
  59. package/dist/stringUtils.js +1 -1
  60. package/dist/testUtils.cjs +11 -9
  61. package/dist/testUtils.d.cts +32 -14
  62. package/dist/testUtils.d.ts +32 -14
  63. package/dist/testUtils.js +4 -3
  64. package/dist/throttle.d.cts +57 -48
  65. package/dist/throttle.d.ts +57 -48
  66. package/dist/timers.d.cts +68 -63
  67. package/dist/timers.d.ts +68 -63
  68. package/dist/tsResult.d.cts +7 -6
  69. package/dist/tsResult.d.ts +7 -6
  70. package/dist/typeGuards.d.cts +65 -64
  71. package/dist/typeGuards.d.ts +65 -64
  72. package/dist/typeUtils.d.cts +18 -4
  73. package/dist/typeUtils.d.ts +18 -4
  74. package/dist/typedStrings.d.cts +68 -57
  75. package/dist/typedStrings.d.ts +68 -57
  76. package/dist/typingFnUtils.cjs +15 -0
  77. package/dist/typingFnUtils.d.cts +34 -7
  78. package/dist/typingFnUtils.d.ts +34 -7
  79. package/dist/typingFnUtils.js +18 -35
  80. package/dist/typingTestUtils.cjs +7 -1
  81. package/dist/typingTestUtils.d.cts +52 -11
  82. package/dist/typingTestUtils.d.ts +52 -11
  83. package/dist/typingTestUtils.js +7 -1
  84. package/dist/typingUtils.d.cts +4 -1
  85. package/dist/typingUtils.d.ts +4 -1
  86. package/dist/yamlStringify.cjs +11 -9
  87. package/dist/yamlStringify.js +2 -2
  88. package/package.json +5 -1
  89. package/docs/README.md +0 -72
  90. package/docs/_media/modules.md +0 -58
  91. package/docs/arrayUtils/-internal-.md +0 -179
  92. package/docs/arrayUtils/README.md +0 -550
  93. package/docs/assertions/-internal-.md +0 -63
  94. package/docs/assertions/README.md +0 -565
  95. package/docs/asyncQueue/-internal-.md +0 -297
  96. package/docs/asyncQueue/README.md +0 -1485
  97. package/docs/awaitDebounce.md +0 -66
  98. package/docs/cache/-internal-.md +0 -168
  99. package/docs/cache/README.md +0 -360
  100. package/docs/castValues.md +0 -47
  101. package/docs/concurrentCalls/-internal-.md +0 -490
  102. package/docs/concurrentCalls/README.md +0 -299
  103. package/docs/consoleFmt.md +0 -115
  104. package/docs/conversions.md +0 -27
  105. package/docs/createThrottleController/-internal-.md +0 -73
  106. package/docs/createThrottleController/README.md +0 -31
  107. package/docs/debounce.md +0 -188
  108. package/docs/dedent/-internal-.md +0 -17
  109. package/docs/dedent/README.md +0 -204
  110. package/docs/deepEqual.md +0 -94
  111. package/docs/enhancedMap.md +0 -358
  112. package/docs/exhaustiveMatch/-internal-.md +0 -39
  113. package/docs/exhaustiveMatch/README.md +0 -146
  114. package/docs/filterObjectOrArrayKeys.md +0 -109
  115. package/docs/getAutoIncrementId.md +0 -93
  116. package/docs/getCompositeKey.md +0 -39
  117. package/docs/getValueStableKey.md +0 -57
  118. package/docs/hash.md +0 -31
  119. package/docs/interpolate/-internal-.md +0 -61
  120. package/docs/interpolate/README.md +0 -62
  121. package/docs/keepPrevIfUnchanged.md +0 -43
  122. package/docs/levenshtein.md +0 -93
  123. package/docs/main.md +0 -21
  124. package/docs/mathUtils.md +0 -137
  125. package/docs/modules.md +0 -58
  126. package/docs/mutationUtils.md +0 -44
  127. package/docs/objUtils.md +0 -237
  128. package/docs/parallelAsyncCalls/-internal-.md +0 -347
  129. package/docs/parallelAsyncCalls/README.md +0 -45
  130. package/docs/promiseUtils/-internal-.md +0 -69
  131. package/docs/promiseUtils/README.md +0 -31
  132. package/docs/retryOnError/-internal-.md +0 -111
  133. package/docs/retryOnError/README.md +0 -168
  134. package/docs/runShellCmd/-internal-.md +0 -111
  135. package/docs/runShellCmd/README.md +0 -201
  136. package/docs/safeJson.md +0 -51
  137. package/docs/saferTyping.md +0 -228
  138. package/docs/serializeXML.md +0 -100
  139. package/docs/shallowEqual.md +0 -33
  140. package/docs/sleep.md +0 -27
  141. package/docs/stringUtils/-internal-.md +0 -17
  142. package/docs/stringUtils/README.md +0 -270
  143. package/docs/testUtils.md +0 -382
  144. package/docs/throttle/-internal-.md +0 -47
  145. package/docs/throttle/README.md +0 -178
  146. package/docs/time.md +0 -274
  147. package/docs/timers.md +0 -256
  148. package/docs/tsResult/-internal-.md +0 -327
  149. package/docs/tsResult/README.md +0 -702
  150. package/docs/typeGuards.md +0 -399
  151. package/docs/typeUtils/-internal-.md +0 -99
  152. package/docs/typeUtils/README.md +0 -195
  153. package/docs/typeUtils.typesTest.md +0 -7
  154. package/docs/typedStrings.md +0 -458
  155. package/docs/typingFnUtils/-internal-.md +0 -43
  156. package/docs/typingFnUtils/README.md +0 -317
  157. package/docs/typingTestUtils.md +0 -172
  158. package/docs/typingUtils.md +0 -135
  159. package/docs/yamlStringify.md +0 -83
@@ -1,69 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / [promiseUtils](README.md) / \<internal\>
6
-
7
- # \<internal\>
8
-
9
- ## Type Aliases
10
-
11
- ### Deferred\<T\>
12
-
13
- ```ts
14
- type Deferred<T> = object;
15
- ```
16
-
17
- Defined in: [packages/utils/src/promiseUtils.ts:1](https://github.com/lucasols/utils/blob/main/packages/utils/src/promiseUtils.ts#L1)
18
-
19
- #### Type Parameters
20
-
21
- ##### T
22
-
23
- `T`
24
-
25
- #### Properties
26
-
27
- ##### promise
28
-
29
- ```ts
30
- promise: Promise<T>;
31
- ```
32
-
33
- Defined in: [packages/utils/src/promiseUtils.ts:4](https://github.com/lucasols/utils/blob/main/packages/utils/src/promiseUtils.ts#L4)
34
-
35
- ##### reject()
36
-
37
- ```ts
38
- reject: (reason) => void;
39
- ```
40
-
41
- Defined in: [packages/utils/src/promiseUtils.ts:3](https://github.com/lucasols/utils/blob/main/packages/utils/src/promiseUtils.ts#L3)
42
-
43
- ###### Parameters
44
-
45
- ###### reason
46
-
47
- `unknown`
48
-
49
- ###### Returns
50
-
51
- `void`
52
-
53
- ##### resolve()
54
-
55
- ```ts
56
- resolve: (value) => void;
57
- ```
58
-
59
- Defined in: [packages/utils/src/promiseUtils.ts:2](https://github.com/lucasols/utils/blob/main/packages/utils/src/promiseUtils.ts#L2)
60
-
61
- ###### Parameters
62
-
63
- ###### value
64
-
65
- `T` | `PromiseLike`\<`T`\>
66
-
67
- ###### Returns
68
-
69
- `void`
@@ -1,31 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / promiseUtils
6
-
7
- # promiseUtils
8
-
9
- ## Modules
10
-
11
- - [\<internal\>](-internal-.md)
12
-
13
- ## Functions
14
-
15
- ### defer()
16
-
17
- ```ts
18
- function defer<T>(): Deferred<T>;
19
- ```
20
-
21
- Defined in: [packages/utils/src/promiseUtils.ts:7](https://github.com/lucasols/utils/blob/main/packages/utils/src/promiseUtils.ts#L7)
22
-
23
- #### Type Parameters
24
-
25
- ##### T
26
-
27
- `T` = `void`
28
-
29
- #### Returns
30
-
31
- [`Deferred`](-internal-.md#deferred)\<`T`\>
@@ -1,111 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / [retryOnError](README.md) / \<internal\>
6
-
7
- # \<internal\>
8
-
9
- ## Type Aliases
10
-
11
- ### RetryOptions
12
-
13
- ```ts
14
- type RetryOptions = object;
15
- ```
16
-
17
- Defined in: [packages/utils/src/retryOnError.ts:7](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L7)
18
-
19
- Configuration options for retryOnError function.
20
-
21
- #### Properties
22
-
23
- ##### debugId?
24
-
25
- ```ts
26
- optional debugId: string;
27
- ```
28
-
29
- Defined in: [packages/utils/src/retryOnError.ts:16](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L16)
30
-
31
- Optional ID for debug logging
32
-
33
- ##### delayBetweenRetriesMs?
34
-
35
- ```ts
36
- optional delayBetweenRetriesMs: number | (retry) => number;
37
- ```
38
-
39
- Defined in: [packages/utils/src/retryOnError.ts:9](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L9)
40
-
41
- Delay between retries in milliseconds or function returning delay
42
-
43
- ##### disableRetries?
44
-
45
- ```ts
46
- optional disableRetries: boolean;
47
- ```
48
-
49
- Defined in: [packages/utils/src/retryOnError.ts:18](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L18)
50
-
51
- Disable retries
52
-
53
- ##### onRetry()?
54
-
55
- ```ts
56
- optional onRetry: (error, lastAttempt) => void;
57
- ```
58
-
59
- Defined in: [packages/utils/src/retryOnError.ts:20](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L20)
60
-
61
- Function to call when retry happens
62
-
63
- ###### Parameters
64
-
65
- ###### error
66
-
67
- `Error`
68
-
69
- ###### lastAttempt
70
-
71
- ###### duration
72
-
73
- `number`
74
-
75
- ###### retry
76
-
77
- `number`
78
-
79
- ###### Returns
80
-
81
- `void`
82
-
83
- ##### retryCondition()?
84
-
85
- ```ts
86
- optional retryCondition: (error, lastAttempt) => boolean;
87
- ```
88
-
89
- Defined in: [packages/utils/src/retryOnError.ts:11](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L11)
90
-
91
- Function to determine if retry should happen, receives error and duration of last attempt
92
-
93
- ###### Parameters
94
-
95
- ###### error
96
-
97
- `Error`
98
-
99
- ###### lastAttempt
100
-
101
- ###### duration
102
-
103
- `number`
104
-
105
- ###### retry
106
-
107
- `number`
108
-
109
- ###### Returns
110
-
111
- `boolean`
@@ -1,168 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / retryOnError
6
-
7
- # retryOnError
8
-
9
- ## Modules
10
-
11
- - [\<internal\>](-internal-.md)
12
-
13
- ## Functions
14
-
15
- ### retryOnError()
16
-
17
- ```ts
18
- function retryOnError<T>(
19
- fn,
20
- maxRetries,
21
- options,
22
- retry,
23
- originalMaxRetries): Promise<T>;
24
- ```
25
-
26
- Defined in: [packages/utils/src/retryOnError.ts:46](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L46)
27
-
28
- Retries a function on error with configurable retry logic.
29
-
30
- #### Type Parameters
31
-
32
- ##### T
33
-
34
- `T`
35
-
36
- #### Parameters
37
-
38
- ##### fn
39
-
40
- (`ctx`) => `Promise`\<`T`\>
41
-
42
- Function to retry that receives context with retry count
43
-
44
- ##### maxRetries
45
-
46
- `number`
47
-
48
- Maximum number of retries
49
-
50
- ##### options
51
-
52
- [`RetryOptions`](-internal-.md#retryoptions) = `{}`
53
-
54
- Configuration options
55
-
56
- ##### retry
57
-
58
- `number` = `0`
59
-
60
- internal use only
61
-
62
- ##### originalMaxRetries
63
-
64
- `number` = `maxRetries`
65
-
66
- internal use only
67
-
68
- #### Returns
69
-
70
- `Promise`\<`T`\>
71
-
72
- Promise resolving to the function result or rejecting with the final error
73
-
74
- #### Example
75
-
76
- ```ts
77
- await retryOnError(
78
- async (ctx) => {
79
- console.log(`Attempt ${ctx.retry + 1}`);
80
- return await fetchData();
81
- },
82
- 3,
83
- { delayBetweenRetriesMs: 1000 }
84
- );
85
- ```
86
-
87
- ***
88
-
89
- ### retryResultOnError()
90
-
91
- ```ts
92
- function retryResultOnError<T, E>(
93
- fn,
94
- maxRetries,
95
- options,
96
- __retry,
97
- __originalMaxRetries): Promise<Result<T, E>>;
98
- ```
99
-
100
- Defined in: [packages/utils/src/retryOnError.ts:132](https://github.com/lucasols/utils/blob/main/packages/utils/src/retryOnError.ts#L132)
101
-
102
- Retries a result function on error with configurable retry logic.
103
-
104
- #### Type Parameters
105
-
106
- ##### T
107
-
108
- `T`
109
-
110
- ##### E
111
-
112
- `E` *extends* `ResultValidErrors`
113
-
114
- #### Parameters
115
-
116
- ##### fn
117
-
118
- (`ctx`) => `Promise`\<`Result`\<`T`, `E`\>\>
119
-
120
- Function to retry that receives context with retry count
121
-
122
- ##### maxRetries
123
-
124
- `number`
125
-
126
- Maximum number of retries
127
-
128
- ##### options
129
-
130
- Configuration options
131
-
132
- ###### debugId?
133
-
134
- `string`
135
-
136
- ###### delayBetweenRetriesMs?
137
-
138
- `number` \| (`retry`) => `number`
139
-
140
- ###### disableRetries?
141
-
142
- `boolean`
143
-
144
- ###### onRetry?
145
-
146
- (`error`, `lastAttempt`) => `void`
147
-
148
- ###### retryCondition?
149
-
150
- (`error`, `lastAttempt`) => `boolean`
151
-
152
- ##### \_\_retry
153
-
154
- `number` = `0`
155
-
156
- internal use only
157
-
158
- ##### \_\_originalMaxRetries
159
-
160
- `number` = `maxRetries`
161
-
162
- internal use only
163
-
164
- #### Returns
165
-
166
- `Promise`\<`Result`\<`T`, `E`\>\>
167
-
168
- Promise resolving to the function result or rejecting with the final error
@@ -1,111 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / [runShellCmd](README.md) / \<internal\>
6
-
7
- # \<internal\>
8
-
9
- ## Type Aliases
10
-
11
- ### CmdResult
12
-
13
- ```ts
14
- type CmdResult = object;
15
- ```
16
-
17
- Defined in: [packages/utils/src/runShellCmd.ts:3](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L3)
18
-
19
- #### Properties
20
-
21
- ##### error
22
-
23
- ```ts
24
- error: boolean;
25
- ```
26
-
27
- Defined in: [packages/utils/src/runShellCmd.ts:6](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L6)
28
-
29
- ##### label
30
-
31
- ```ts
32
- label: string | null;
33
- ```
34
-
35
- Defined in: [packages/utils/src/runShellCmd.ts:4](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L4)
36
-
37
- ##### out
38
-
39
- ```ts
40
- out: string;
41
- ```
42
-
43
- Defined in: [packages/utils/src/runShellCmd.ts:5](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L5)
44
-
45
- ##### stderr
46
-
47
- ```ts
48
- stderr: string;
49
- ```
50
-
51
- Defined in: [packages/utils/src/runShellCmd.ts:8](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L8)
52
-
53
- ##### stdout
54
-
55
- ```ts
56
- stdout: string;
57
- ```
58
-
59
- Defined in: [packages/utils/src/runShellCmd.ts:7](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L7)
60
-
61
- ***
62
-
63
- ### RunCmdOptions
64
-
65
- ```ts
66
- type RunCmdOptions = object;
67
- ```
68
-
69
- Defined in: [packages/utils/src/runShellCmd.ts:13](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L13)
70
-
71
- #### Properties
72
-
73
- ##### cwd?
74
-
75
- ```ts
76
- optional cwd: string;
77
- ```
78
-
79
- Defined in: [packages/utils/src/runShellCmd.ts:16](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L16)
80
-
81
- ##### mock?
82
-
83
- ```ts
84
- optional mock: CmdResult;
85
- ```
86
-
87
- Defined in: [packages/utils/src/runShellCmd.ts:14](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L14)
88
-
89
- ##### noCiColorForce?
90
-
91
- ```ts
92
- optional noCiColorForce: boolean;
93
- ```
94
-
95
- Defined in: [packages/utils/src/runShellCmd.ts:18](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L18)
96
-
97
- ##### silent?
98
-
99
- ```ts
100
- optional silent: boolean | "timeOnly";
101
- ```
102
-
103
- Defined in: [packages/utils/src/runShellCmd.ts:15](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L15)
104
-
105
- ##### throwOnError?
106
-
107
- ```ts
108
- optional throwOnError: boolean;
109
- ```
110
-
111
- Defined in: [packages/utils/src/runShellCmd.ts:17](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L17)
@@ -1,201 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / runShellCmd
6
-
7
- # runShellCmd
8
-
9
- ## Modules
10
-
11
- - [\<internal\>](-internal-.md)
12
-
13
- ## Functions
14
-
15
- ### ~~concurrentCmd()~~
16
-
17
- ```ts
18
- function concurrentCmd(
19
- label,
20
- cmd,
21
- onResult): Promise<() => void>;
22
- ```
23
-
24
- Defined in: [packages/utils/src/runShellCmd.ts:133](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L133)
25
-
26
- #### Parameters
27
-
28
- ##### label
29
-
30
- `string`
31
-
32
- ##### cmd
33
-
34
- `string` | `string`[]
35
-
36
- ##### onResult
37
-
38
- (`result`) => `void`
39
-
40
- #### Returns
41
-
42
- `Promise`\<() => `void`\>
43
-
44
- #### Deprecated
45
-
46
- This utility has been moved to @ls-stack/node-utils. Please update your imports:
47
- ```
48
- // Old (deprecated)
49
- import { concurrentCmd } from '@ls-stack/utils/runShellCmd';
50
-
51
- // New (preferred)
52
- import { concurrentCmd } from '@ls-stack/node-utils/runShellCmd';
53
- ```
54
-
55
- ***
56
-
57
- ### ~~runCmd()~~
58
-
59
- ```ts
60
- function runCmd(
61
- label,
62
- command,
63
- root0): Promise<CmdResult>;
64
- ```
65
-
66
- Defined in: [packages/utils/src/runShellCmd.ts:39](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L39)
67
-
68
- #### Parameters
69
-
70
- ##### label
71
-
72
- `null` | `string`
73
-
74
- ##### command
75
-
76
- `string` | `string`[]
77
-
78
- ##### root0
79
-
80
- [`RunCmdOptions`](-internal-.md#runcmdoptions) = `{}`
81
-
82
- #### Returns
83
-
84
- `Promise`\<[`CmdResult`](-internal-.md#cmdresult)\>
85
-
86
- #### Deprecated
87
-
88
- This utility has been moved to @ls-stack/node-utils. Please update your imports:
89
- ```
90
- // Old (deprecated)
91
- import { runCmd } from '@ls-stack/utils/runShellCmd';
92
-
93
- // New (preferred)
94
- import { runCmd } from '@ls-stack/node-utils/runShellCmd';
95
- ```
96
-
97
- ***
98
-
99
- ### ~~runCmdSilent()~~
100
-
101
- ```ts
102
- function runCmdSilent(command): Promise<CmdResult>;
103
- ```
104
-
105
- Defined in: [packages/utils/src/runShellCmd.ts:198](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L198)
106
-
107
- #### Parameters
108
-
109
- ##### command
110
-
111
- `string` | `string`[]
112
-
113
- #### Returns
114
-
115
- `Promise`\<[`CmdResult`](-internal-.md#cmdresult)\>
116
-
117
- #### Deprecated
118
-
119
- This utility has been moved to @ls-stack/node-utils. Please update your imports:
120
- ```
121
- // Old (deprecated)
122
- import { runCmdSilent } from '@ls-stack/utils/runShellCmd';
123
-
124
- // New (preferred)
125
- import { runCmdSilent } from '@ls-stack/node-utils/runShellCmd';
126
- ```
127
-
128
- ***
129
-
130
- ### ~~runCmdSilentUnwrap()~~
131
-
132
- ```ts
133
- function runCmdSilentUnwrap(command): Promise<string>;
134
- ```
135
-
136
- Defined in: [packages/utils/src/runShellCmd.ts:213](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L213)
137
-
138
- #### Parameters
139
-
140
- ##### command
141
-
142
- `string` | `string`[]
143
-
144
- #### Returns
145
-
146
- `Promise`\<`string`\>
147
-
148
- #### Deprecated
149
-
150
- This utility has been moved to @ls-stack/node-utils. Please update your imports:
151
- ```
152
- // Old (deprecated)
153
- import { runCmdSilentUnwrap } from '@ls-stack/utils/runShellCmd';
154
-
155
- // New (preferred)
156
- import { runCmdSilentUnwrap } from '@ls-stack/node-utils/runShellCmd';
157
- ```
158
-
159
- ***
160
-
161
- ### ~~runCmdUnwrap()~~
162
-
163
- ```ts
164
- function runCmdUnwrap(
165
- label,
166
- command,
167
- root0): Promise<string>;
168
- ```
169
-
170
- Defined in: [packages/utils/src/runShellCmd.ts:175](https://github.com/lucasols/utils/blob/main/packages/utils/src/runShellCmd.ts#L175)
171
-
172
- #### Parameters
173
-
174
- ##### label
175
-
176
- `null` | `string`
177
-
178
- ##### command
179
-
180
- `string` | `string`[]
181
-
182
- ##### root0
183
-
184
- ###### silent?
185
-
186
- `boolean` \| `"timeOnly"`
187
-
188
- #### Returns
189
-
190
- `Promise`\<`string`\>
191
-
192
- #### Deprecated
193
-
194
- This utility has been moved to @ls-stack/node-utils. Please update your imports:
195
- ```
196
- // Old (deprecated)
197
- import { runCmdUnwrap } from '@ls-stack/utils/runShellCmd';
198
-
199
- // New (preferred)
200
- import { runCmdUnwrap } from '@ls-stack/node-utils/runShellCmd';
201
- ```