evophp 1.0.22 → 1.0.23

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/helpers.js CHANGED
@@ -1,10 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const readline = require('readline');
4
- const rl = readline.createInterface({
5
- input: process.stdin,
6
- output: process.stdout
7
- });
8
4
 
9
5
  /**
10
6
  * Prompt user for input with a message
@@ -12,6 +8,11 @@ const rl = readline.createInterface({
12
8
  * @returns {Promise<string>} - Resolves with user input
13
9
  */
14
10
  const readLineAsync = (msg) => {
11
+ const rl = readline.createInterface({
12
+ input: process.stdin,
13
+ output: process.stdout
14
+ });
15
+
15
16
  return new Promise((resolve) => {
16
17
  rl.question(msg, (userRes) => {
17
18
  resolve(userRes);
package/new-plugin.js CHANGED
@@ -246,4 +246,17 @@ const editFile = async (file, data) => {
246
246
  });
247
247
  });
248
248
  })
249
+ }
250
+
251
+ const test = (str, maxLength) => {
252
+ str = str.trim().replaceAll(" ", "")
253
+ if(str.length > maxLength) {
254
+ console.error(`Your input cannot be longer than ${maxLength} characters`);
255
+ return false
256
+ }
257
+ if(str.length < 1) {
258
+ console.error(`You have not made any entry`);
259
+ return false
260
+ }
261
+ return str;
249
262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evophp",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "Installer for the Evolution PHP project",
5
5
  "main": "installer.js",
6
6
  "scripts": {