faf 1.0.2 → 1.0.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/bin/faf.js +6 -6
- package/package.json +1 -1
package/bin/faf.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* FAF - Foundational AI-context Format
|
|
5
5
|
* IANA-registered: application/vnd.faf+yaml
|
|
6
6
|
*
|
|
7
|
-
* Passes through to faf-cli's
|
|
7
|
+
* Passes through to faf-cli's CLI entry point.
|
|
8
8
|
* Install: npm install -g faf
|
|
9
|
-
* Usage: faf init | faf auto | faf
|
|
9
|
+
* Usage: faf | faf init | faf auto | faf go
|
|
10
10
|
*
|
|
11
11
|
* https://faf.one
|
|
12
12
|
*/
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
const { execFileSync } = require('child_process');
|
|
15
15
|
const path = require('path');
|
|
16
16
|
|
|
17
|
-
// Resolve faf-cli's
|
|
18
|
-
const
|
|
17
|
+
// Resolve faf-cli's main, then swap index.js for cli.js
|
|
18
|
+
const mainEntry = require.resolve('faf-cli');
|
|
19
|
+
const cliEntry = path.join(path.dirname(mainEntry), 'cli.js');
|
|
19
20
|
|
|
20
21
|
try {
|
|
21
|
-
execFileSync(
|
|
22
|
+
execFileSync(process.execPath, [cliEntry, ...process.argv.slice(2)], { stdio: 'inherit' });
|
|
22
23
|
} catch (e) {
|
|
23
|
-
// execFileSync throws on non-zero exit — just forward the code
|
|
24
24
|
process.exit(e.status || 1);
|
|
25
25
|
}
|