@cg3/prior-node 0.2.6 → 0.2.7
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/prior.js +6 -2
- package/package.json +36 -33
package/bin/prior.js
CHANGED
|
@@ -226,7 +226,8 @@ Examples:
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
const key = await ensureKey();
|
|
229
|
-
|
|
229
|
+
// Only read stdin if required flags are missing (avoids hanging on empty pipe)
|
|
230
|
+
const stdin = (args.title && args.content && args.tags) ? null : await readStdin();
|
|
230
231
|
|
|
231
232
|
// Merge stdin JSON with CLI args (CLI wins)
|
|
232
233
|
if (stdin) {
|
|
@@ -355,7 +356,8 @@ Examples:
|
|
|
355
356
|
}
|
|
356
357
|
|
|
357
358
|
const key = await ensureKey();
|
|
358
|
-
|
|
359
|
+
// Only read stdin if positional args are missing (avoids hanging on empty pipe)
|
|
360
|
+
const stdin = (args._[0] && args._[1]) ? null : await readStdin();
|
|
359
361
|
|
|
360
362
|
// Merge stdin JSON with CLI args (positional args and flags win)
|
|
361
363
|
if (stdin) {
|
|
@@ -599,3 +601,5 @@ async function main() {
|
|
|
599
601
|
}
|
|
600
602
|
|
|
601
603
|
main().catch(err => { console.error("Error:", err.message); process.exit(1); });
|
|
604
|
+
|
|
605
|
+
if (typeof module !== 'undefined') module.exports = { parseArgs };
|
package/package.json
CHANGED
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@cg3/prior-node",
|
|
3
|
+
"version": "0.2.7",
|
|
4
|
+
"description": "CLI for Prior — knowledge exchange for AI agents. Search, contribute, and share solutions.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"prior": "./bin/prior.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/prior.js",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"keywords": [
|
|
14
|
+
"ai",
|
|
15
|
+
"agents",
|
|
16
|
+
"knowledge",
|
|
17
|
+
"cli",
|
|
18
|
+
"prior",
|
|
19
|
+
"search",
|
|
20
|
+
"llm",
|
|
21
|
+
"developer-tools"
|
|
22
|
+
],
|
|
23
|
+
"author": "CG3 LLC",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"homepage": "https://prior.cg3.io",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/cg3-llc/prior_node"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"test": "node --test test/"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": "\u003e=18.0.0"
|
|
35
|
+
}
|
|
36
|
+
}
|