natureco-cli 2.23.5 → 2.23.6

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/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.23.5",
3
+ "version": "2.23.6",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
- "main": "bin/natureco.js",
6
5
  "bin": {
7
- "natureco": "./bin/natureco.js"
6
+ "natureco": "bin/natureco.js"
8
7
  },
9
8
  "files": [
10
9
  "bin/",
@@ -1,13 +1,11 @@
1
- let _inquirer;
1
+ let promptFn;
2
2
 
3
- module.exports = new Proxy({}, {
4
- get(_, prop) {
5
- if (prop === 'prompt') {
6
- return async (...args) => {
7
- if (!_inquirer) _inquirer = (await import('inquirer')).default;
8
- return _inquirer.prompt(...args);
9
- };
3
+ module.exports = {
4
+ async prompt(questions) {
5
+ if (!promptFn) {
6
+ const mod = await import('inquirer');
7
+ promptFn = mod.default?.prompt || mod.default || mod.prompt;
10
8
  }
11
- return undefined;
9
+ return promptFn(questions);
12
10
  }
13
- });
11
+ };