salesprompter-cli 0.1.9 → 0.1.11
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/auth.js +21 -1
- package/dist/cli.js +16 -4
- package/package.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -25,6 +25,26 @@ const AuthSessionSchema = z.object({
|
|
|
25
25
|
expiresAt: z.string().datetime().optional(),
|
|
26
26
|
createdAt: z.string().datetime()
|
|
27
27
|
});
|
|
28
|
+
function buildBrowserCallbackSuccessHtml() {
|
|
29
|
+
return [
|
|
30
|
+
"<!doctype html>",
|
|
31
|
+
"<html>",
|
|
32
|
+
"<head>",
|
|
33
|
+
'<meta charset="utf-8">',
|
|
34
|
+
"<title>Salesprompter CLI login complete</title>",
|
|
35
|
+
'<meta name="viewport" content="width=device-width, initial-scale=1">',
|
|
36
|
+
"<script>",
|
|
37
|
+
"if (window.history && typeof window.history.replaceState === 'function') {",
|
|
38
|
+
" window.history.replaceState(null, document.title, window.location.pathname);",
|
|
39
|
+
"}",
|
|
40
|
+
"</script>",
|
|
41
|
+
"</head>",
|
|
42
|
+
"<body>",
|
|
43
|
+
"<p>Salesprompter CLI login complete. You can return to the terminal.</p>",
|
|
44
|
+
"</body>",
|
|
45
|
+
"</html>"
|
|
46
|
+
].join("");
|
|
47
|
+
}
|
|
28
48
|
const DeviceStartResponseSchema = z.object({
|
|
29
49
|
deviceCode: z.string().min(1),
|
|
30
50
|
userCode: z.string().min(1),
|
|
@@ -247,7 +267,7 @@ export async function loginWithBrowserConnect(options) {
|
|
|
247
267
|
}
|
|
248
268
|
response.statusCode = 200;
|
|
249
269
|
response.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
250
|
-
response.end(
|
|
270
|
+
response.end(buildBrowserCallbackSuccessHtml());
|
|
251
271
|
resolveToken?.({ accessToken, state: responseState });
|
|
252
272
|
}
|
|
253
273
|
catch (error) {
|
package/dist/cli.js
CHANGED
|
@@ -459,10 +459,22 @@ async function runWizard(options) {
|
|
|
459
459
|
output: process.stdout
|
|
460
460
|
});
|
|
461
461
|
try {
|
|
462
|
-
const flow = await promptChoice(rl, "What do you want
|
|
463
|
-
{
|
|
464
|
-
|
|
465
|
-
|
|
462
|
+
const flow = await promptChoice(rl, "What do you want help with?", [
|
|
463
|
+
{
|
|
464
|
+
value: "vendor-icp",
|
|
465
|
+
label: "Define my ICP",
|
|
466
|
+
description: "Example: I sell Deel and want the kind of companies Deel sells to"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
value: "target-account",
|
|
470
|
+
label: "Find people at a specific company",
|
|
471
|
+
description: "Example: find contacts at deel.com"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
value: "vendor-lookup",
|
|
475
|
+
label: "Search BigQuery for matching leads",
|
|
476
|
+
description: "Best if your lead data is already in BigQuery and you want SQL or results"
|
|
477
|
+
}
|
|
466
478
|
], "vendor-icp");
|
|
467
479
|
writeWizardLine();
|
|
468
480
|
if (flow === "vendor-icp") {
|
package/package.json
CHANGED