elrh-cosca 0.2.2 → 0.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.
- package/README.md +16 -0
- package/package.json +1 -1
- package/test/cosca-test.js +7 -1
package/README.md
CHANGED
|
@@ -115,6 +115,22 @@ async function promptUser(question: string): Promise<boolean>
|
|
|
115
115
|
|
|
116
116
|
Prints out a `question` to the console and waits for the input. Returns `true` when `y` is pressed and `false` otherwise.
|
|
117
117
|
|
|
118
|
+
#### `showMessage`
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
async function showMessage(message: string, newlines: number = 1): Promise<void>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Prints out a `message` to `process.stdout` and adds the specified number of newlines after it (default is 1).
|
|
125
|
+
|
|
126
|
+
#### `showError`
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
async function showError(message: string, newlines: number = 1): Promise<void>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Prints out a `message` to `process.stderr` and adds the specified number of newlines after it (default is 1).
|
|
133
|
+
|
|
118
134
|
### List of other utils
|
|
119
135
|
|
|
120
136
|
#### `parseQualifiedPath`
|
package/package.json
CHANGED
package/test/cosca-test.js
CHANGED
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
// manual test script for COSCA functions
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
createFileFromTemplate, createFileFromWebTemplate, promptUser,
|
|
6
|
+
createFileFromTemplate, createFileFromWebTemplate, promptUser, showError, showMessage,
|
|
7
|
+
updateConfigFile, updateJsonFile, updateTextFile
|
|
7
8
|
} from '../dist/elrh-cosca.mjs'
|
|
8
9
|
|
|
9
10
|
async function main() {
|
|
11
|
+
console.log('Test showMessage')
|
|
12
|
+
showMessage('Hello!')
|
|
13
|
+
console.log('Test showMessage')
|
|
14
|
+
showError('ERROR!')
|
|
15
|
+
|
|
10
16
|
console.log('Test promptUser')
|
|
11
17
|
const input = await promptUser('Is it today?')
|
|
12
18
|
console.log('User input:', input)
|