@indra.ai/deva 1.4.24 → 1.4.25
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/index.js +15 -11
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -1486,23 +1486,27 @@ class Deva {
|
|
|
1486
1486
|
help(msg, help_dir) {
|
|
1487
1487
|
return new Promise((resolve, reject) => {
|
|
1488
1488
|
if (!this._active) return resolve(this._messages.offline);
|
|
1489
|
-
this.zone('help');
|
|
1490
|
-
this.feature('help');
|
|
1491
|
-
this.action('help');
|
|
1492
|
-
this.state('help');
|
|
1493
|
-
this.context('help');
|
|
1494
|
-
|
|
1495
1489
|
const params = msg.split(' ');
|
|
1496
1490
|
let helpFile = 'main';
|
|
1497
1491
|
if (params[0]) helpFile = params[0];
|
|
1498
1492
|
if (params[1]) helpFile = `${params[0]}_${params[1]}`;
|
|
1499
|
-
|
|
1493
|
+
|
|
1494
|
+
this.context('help', helpFile);
|
|
1495
|
+
this.zone('help', helpFile);
|
|
1496
|
+
this.feature('help', helpFile);
|
|
1497
|
+
this.action('help', helpFile);
|
|
1498
|
+
this.state('help', helpFile);
|
|
1499
|
+
|
|
1500
|
+
const helpPath = this.lib.path.join(help_dir, 'help', `${helpFile}.feecting`);
|
|
1500
1501
|
try {
|
|
1501
|
-
|
|
1502
|
-
return resolve(this.
|
|
1502
|
+
const helpExists = fs.existsSync(helpPath);
|
|
1503
|
+
if (!helpExists) return resolve(this._messages.help_not_found);
|
|
1504
|
+
const helpDoc = this.lib.fs.readFileSync(helpPath, 'utf8');
|
|
1505
|
+
this.state('resolve', `help:${helpFile}`);
|
|
1506
|
+
return resolve(helpDoc);
|
|
1503
1507
|
} catch (e) {
|
|
1504
|
-
this.state('reject',
|
|
1505
|
-
return
|
|
1508
|
+
this.state('reject', `help:${helpFile}`);
|
|
1509
|
+
return this.error(msg, e, reject);
|
|
1506
1510
|
}
|
|
1507
1511
|
});
|
|
1508
1512
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.25",
|
|
4
4
|
"description": "The Deva Core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"copyright": "(c)2025 Quinn Michaels; All rights reserved.",
|
|
@@ -280,6 +280,7 @@
|
|
|
280
280
|
"notext": "NO TEXT WAS PROVIDED",
|
|
281
281
|
"nopacket": "NO PACKET WAS PROVIDED",
|
|
282
282
|
"method_not_found": "METHOD NOT FOUND",
|
|
283
|
+
"help_not_found": "🚫 HELP NOT FOUND",
|
|
283
284
|
"stop": "Stop Deva.",
|
|
284
285
|
"exit": "Exit Deva"
|
|
285
286
|
}
|