@hanzogui/get 8.0.0 → 8.1.0
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/dist/cli.js +2 -3
- package/package.json +3 -3
- package/src/cli.ts +6 -2
- package/src/commands/pick.ts +4 -4
package/dist/cli.js
CHANGED
|
@@ -64,7 +64,7 @@ var init_ansi = __esm(() => {
|
|
|
64
64
|
var require_package = __commonJS((exports, module) => {
|
|
65
65
|
module.exports = {
|
|
66
66
|
name: "@hanzogui/get",
|
|
67
|
-
version: "8.
|
|
67
|
+
version: "8.1.0",
|
|
68
68
|
description: "CLI installer for Hanzo GUI recipes.",
|
|
69
69
|
license: "BSD-3-Clause",
|
|
70
70
|
author: "Hanzo AI <dev@hanzo.ai>",
|
|
@@ -350,8 +350,7 @@ class FuseIndex {
|
|
|
350
350
|
value: item
|
|
351
351
|
});
|
|
352
352
|
});
|
|
353
|
-
}
|
|
354
|
-
;
|
|
353
|
+
}
|
|
355
354
|
}
|
|
356
355
|
record.$[keyIndex] = subRecords;
|
|
357
356
|
} else if (isString(value) && !isBlank(value)) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/get",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "CLI installer for Hanzo GUI recipes.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"author": "Hanzo AI <dev@hanzo.ai>",
|
|
7
7
|
"homepage": "https://gui.hanzo.ai",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/hanzoai/gui.git",
|
|
10
|
+
"url": "git+https://github.com/hanzoai/gui.git",
|
|
11
11
|
"directory": "pkgs/get"
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "bun test"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@hanzogui/recipes": "8.
|
|
33
|
+
"@hanzogui/recipes": "8.1.0",
|
|
34
34
|
"fuse.js": "7.1.0"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
package/src/cli.ts
CHANGED
|
@@ -24,8 +24,12 @@ async function main(): Promise<void> {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if (cmd === '--version' || cmd === '-v') {
|
|
27
|
-
const pkg = await import('../package.json', {
|
|
28
|
-
|
|
27
|
+
const pkg = await import('../package.json', {
|
|
28
|
+
with: { type: 'json' },
|
|
29
|
+
} as ImportCallOptions)
|
|
30
|
+
process.stdout.write(
|
|
31
|
+
((pkg as { default?: { version?: string } }).default?.version ?? 'unknown') + '\n'
|
|
32
|
+
)
|
|
29
33
|
return
|
|
30
34
|
}
|
|
31
35
|
|
package/src/commands/pick.ts
CHANGED
|
@@ -19,10 +19,10 @@ export async function pick(): Promise<void> {
|
|
|
19
19
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout })
|
|
20
20
|
|
|
21
21
|
try {
|
|
22
|
-
const query = (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const query = (
|
|
23
|
+
await rl.question(bold('Search recipes') + ' (empty = show all): ')
|
|
24
|
+
).trim()
|
|
25
|
+
const hits = query ? fuse.search(query).map((h) => h.item) : recipes
|
|
26
26
|
if (hits.length === 0) {
|
|
27
27
|
process.stdout.write(dim('No matches.\n'))
|
|
28
28
|
return
|