Skip to content

Commit f5f4a0c

Browse files
committed
fix(typesense): Get client type from created client to avoid double-installation conflict, yarn fix
1 parent dbfcd91 commit f5f4a0c

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

scripts/generate-stories.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const argv = yargs(hideBin(process.argv))
6363
default: paths.defaultStoriesConfig,
6464
describe:
6565
"Path to a multi-document yaml file with story configs. Each config is a map with name, folder, grouping, and figmaUrl fields."
66-
}).parseSync()
66+
})
67+
.parseSync()
6768

6869
generateStories(argv.template, argv.stories)

scripts/typesense-admin.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { execSync } from "child_process"
22
import repl from "repl"
3-
import { Client } from "typesense"
43
import yargs, { Arguments } from "yargs"
54
import { hideBin } from "yargs/helpers"
65
import { createClient } from "../functions/src/search/client"
76

87
declare global {
9-
var client: Client
8+
var client: ReturnType<typeof createClient>
109
}
1110

1211
const envs: Record<string, { url: string; key?: string; alias?: string }> = {
@@ -47,15 +46,10 @@ yargs(hideBin(process.argv))
4746
console.log("Created", key.value)
4847
}
4948
)
50-
.command(
51-
"list-keys",
52-
"list keys",
53-
{},
54-
async (args: Args) => {
55-
const client = resolveClient(args)
56-
console.log(await client.keys().retrieve())
57-
}
58-
)
49+
.command("list-keys", "list keys", {}, async (args: Args) => {
50+
const client = resolveClient(args)
51+
console.log(await client.keys().retrieve())
52+
})
5953
.command(
6054
"delete-key <id>",
6155
"list keys",

0 commit comments

Comments
 (0)