salesprompter-cli 0.1.23 → 0.1.25
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/README.md +10 -13
- package/dist/auth.js +2 -2
- package/dist/cli.js +1373 -27
- package/dist/hunter-emails.js +291 -0
- package/dist/linkedin-companies.js +550 -0
- package/dist/linkedin-products.js +68 -18
- package/dist/linkedin-session.js +13 -3
- package/dist/sales-navigator.js +15 -4
- package/package.json +8 -7
package/dist/linkedin-session.js
CHANGED
|
@@ -92,13 +92,20 @@ function isFalsySetting(value) {
|
|
|
92
92
|
return ["0", "false", "off", "no"].includes(value?.trim().toLowerCase() || "");
|
|
93
93
|
}
|
|
94
94
|
export function resolveCliLinkedInSessionExclusions(env = process.env) {
|
|
95
|
+
const includeDefaultExclusions = !isFalsySetting(resolveConfiguredEnvValue(env, "SALESPROMPTER_LINKEDIN_SESSION_EXCLUDE_DEFAULT_IDENTITIES"));
|
|
96
|
+
const defaultExcludedEmails = includeDefaultExclusions
|
|
97
|
+
? DEFAULT_EXCLUDED_LINKEDIN_SESSION_USER_EMAILS
|
|
98
|
+
: [];
|
|
99
|
+
const defaultExcludedHandles = includeDefaultExclusions
|
|
100
|
+
? DEFAULT_EXCLUDED_LINKEDIN_SESSION_USER_HANDLES
|
|
101
|
+
: [];
|
|
95
102
|
return {
|
|
96
103
|
userEmails: dedupeIdentityValues([
|
|
97
|
-
...
|
|
104
|
+
...defaultExcludedEmails,
|
|
98
105
|
...parseIdentityEnvList(resolveConfiguredEnvValue(env, "SALESPROMPTER_LINKEDIN_SESSION_EXCLUDED_EMAILS"))
|
|
99
106
|
]),
|
|
100
107
|
userHandles: dedupeIdentityValues([
|
|
101
|
-
...
|
|
108
|
+
...defaultExcludedHandles,
|
|
102
109
|
...parseIdentityEnvList(resolveConfiguredEnvValue(env, "SALESPROMPTER_LINKEDIN_SESSION_EXCLUDED_HANDLES"))
|
|
103
110
|
])
|
|
104
111
|
};
|
|
@@ -112,10 +119,13 @@ function isExcludedLinkedInSessionIdentity(identity, exclusions) {
|
|
|
112
119
|
return Boolean(normalizedHandle && exclusions.userHandles.includes(normalizedHandle));
|
|
113
120
|
}
|
|
114
121
|
function getCookieVaultKey(env = process.env) {
|
|
115
|
-
const
|
|
122
|
+
const rawSecret = resolveConfiguredEnvValue(env, "LINKEDIN_SESSION_COOKIE_ENCRYPTION_KEY") ||
|
|
116
123
|
resolveConfiguredEnvValue(env, "EXTENSION_AUTH_SECRET") ||
|
|
117
124
|
resolveConfiguredEnvValue(env, "CLERK_SECRET_KEY") ||
|
|
118
125
|
null;
|
|
126
|
+
const secret = rawSecret
|
|
127
|
+
? rawSecret.replace(/\\n/g, "\n").trim()
|
|
128
|
+
: null;
|
|
119
129
|
if (!secret) {
|
|
120
130
|
return null;
|
|
121
131
|
}
|
package/dist/sales-navigator.js
CHANGED
|
@@ -107,12 +107,12 @@ const SALES_NAVIGATOR_FUNCTION_HINTS = [
|
|
|
107
107
|
{
|
|
108
108
|
name: "Information Technology",
|
|
109
109
|
filterValue: { text: "Information Technology", selectionType: "INCLUDED" },
|
|
110
|
-
patterns: [/(^|[^a-z])(information technology|
|
|
110
|
+
patterns: [/(^|[^a-z])(information technology|devops|infrastructure|security|help desk|service desk)([^a-z]|$)/i],
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
name: "Engineering",
|
|
114
114
|
filterValue: { text: "Engineering", selectionType: "INCLUDED" },
|
|
115
|
-
patterns: [/(^|[^a-z])(engineering|developer|
|
|
115
|
+
patterns: [/(^|[^a-z])(engineering|developer|platform engineer|technical lead|cto\b)([^a-z]|$)/i],
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
name: "Sales",
|
|
@@ -393,11 +393,22 @@ export function buildSalesNavigatorPeopleSearchUrl(filters) {
|
|
|
393
393
|
return url.toString();
|
|
394
394
|
}
|
|
395
395
|
function inferSalesNavigatorFunctionFilters(options) {
|
|
396
|
-
const
|
|
396
|
+
const titleHaystack = options.title.trim();
|
|
397
|
+
const categoryHaystack = [options.categoryName, options.categorySlug]
|
|
397
398
|
.filter((value) => typeof value === "string" && value.trim().length > 0)
|
|
398
399
|
.join(" ");
|
|
399
400
|
for (const hint of SALES_NAVIGATOR_FUNCTION_HINTS) {
|
|
400
|
-
if (hint.patterns.some((pattern) => pattern.test(
|
|
401
|
+
if (titleHaystack.length > 0 && hint.patterns.some((pattern) => pattern.test(titleHaystack))) {
|
|
402
|
+
return [
|
|
403
|
+
{
|
|
404
|
+
type: "FUNCTION",
|
|
405
|
+
values: [hint.filterValue]
|
|
406
|
+
}
|
|
407
|
+
];
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
for (const hint of SALES_NAVIGATOR_FUNCTION_HINTS) {
|
|
411
|
+
if (categoryHaystack.length > 0 && hint.patterns.some((pattern) => pattern.test(categoryHaystack))) {
|
|
401
412
|
return [
|
|
402
413
|
{
|
|
403
414
|
type: "FUNCTION",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "salesprompter-cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.25",
|
|
4
|
+
"description": "Sales workflow CLI for guided lead generation, enrichment, scoring, and sync.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"salesprompter": "dist/cli.js"
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
"keywords": [
|
|
32
32
|
"salesprompter",
|
|
33
33
|
"cli",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"integration",
|
|
34
|
+
"sales",
|
|
35
|
+
"lead-generation",
|
|
36
|
+
"enrichment",
|
|
37
|
+
"scoring",
|
|
39
38
|
"sync",
|
|
39
|
+
"workflow",
|
|
40
|
+
"automation",
|
|
40
41
|
"json",
|
|
41
42
|
"tooling"
|
|
42
43
|
],
|