@curviate/cli 0.33.0 → 0.34.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/CHANGELOG.md +49 -0
- package/README.md +11 -1
- package/dist/{account-IPAW6YRD.js → account-463D5EVY.js} +6 -6
- package/dist/{chunk-REO2BCEX.js → chunk-6W7364S3.js} +1 -1
- package/dist/{chunk-4IPHFPLO.js → chunk-7JU4IXXG.js} +1 -1
- package/dist/{chunk-5SHLELR7.js → chunk-BN7L7WSY.js} +5 -5
- package/dist/{chunk-4EH6EWFW.js → chunk-DCZR4M7G.js} +1 -1
- package/dist/{chunk-27E2M2PS.js → chunk-MNDXMGPX.js} +63 -22
- package/dist/{chunk-4GXO42ZH.js → chunk-XDQHNUEU.js} +1 -1
- package/dist/{chunk-LJR4LJG6.js → chunk-XP2LN6F6.js} +53 -0
- package/dist/{chunk-YCLU5VSN.js → chunk-XZJQQJBE.js} +2 -2
- package/dist/{chunk-REVD4GXL.js → chunk-ZJ7D3NFS.js} +1 -1
- package/dist/cli.js +23 -23
- package/dist/{comment-F2O4UOSD.js → comment-G6RB2PBZ.js} +7 -7
- package/dist/{company-ANZGO2HT.js → company-OWND3W3L.js} +8 -8
- package/dist/{config-ZD3Y5MWP.js → config-RUBXWFQ3.js} +2 -2
- package/dist/{connect-HYJCGYFO.js → connect-3E7EC5ZM.js} +12 -12
- package/dist/{doctor-VPGGB5CW.js → doctor-Z6OSCGKT.js} +4 -4
- package/dist/{exit-codes-ZFWQJYOY.js → exit-codes-YSFFFWMS.js} +1 -1
- package/dist/{feed-IZZYSYYI.js → feed-VDTFIMKN.js} +6 -6
- package/dist/{group-ETDDF2PJ.js → group-KDJHY2IM.js} +6 -6
- package/dist/{inbox-XQQ4YRRO.js → inbox-DQLX2LR7.js} +18 -7
- package/dist/{inboxes-6KHXXEBC.js → inboxes-WMNHOPY7.js} +6 -6
- package/dist/{job-PBTJ5DWL.js → job-ESKS2LDJ.js} +7 -7
- package/dist/{login-HP5URYD6.js → login-YTVPIN27.js} +2 -2
- package/dist/{message-DQQPMRFU.js → message-5W2R3YHS.js} +6 -6
- package/dist/{notification-CXIRJB57.js → notification-IGNUH2GR.js} +6 -6
- package/dist/{post-2S7FYMZO.js → post-NLI76K74.js} +8 -8
- package/dist/{profile-UCERD6RR.js → profile-TBKKIICM.js} +21 -58
- package/dist/{recruiter-PJFUM2ZZ.js → recruiter-AEJRHIX5.js} +8 -8
- package/dist/{sales-nav-7XNJGVIX.js → sales-nav-SW6WJVMD.js} +7 -7
- package/dist/{search-DYGIIODT.js → search-CS6VN5AG.js} +16 -16
- package/dist/{setup-BRULZH53.js → setup-ANHJZJ2S.js} +4 -4
- package/dist/{webhook-2TKWOXYK.js → webhook-NGMRJMQ5.js} +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,55 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
6
6
|
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html):
|
|
7
7
|
a new command or flag is a minor; a breaking command/flag/exit-code change is a major (before 1.0.0, a minor); a fix is a patch.
|
|
8
8
|
|
|
9
|
+
## [0.34.0] - 2026-09-17
|
|
10
|
+
|
|
11
|
+
Three changes and two fixes. `--account` becomes optional when a workspace has
|
|
12
|
+
exactly one connected account, which turns an invocation that used to be a
|
|
13
|
+
usage error into one that runs, so it ships as a minor.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **`--account` is optional when exactly one LinkedIn account is connected.**
|
|
18
|
+
Every account-scoped command, reads and writes, now looks up the connected
|
|
19
|
+
accounts when no account comes from `--account`, `CURVIATE_ACCOUNT` or the
|
|
20
|
+
profile, and uses the only one. `curviate profile me`, which `curviate login`
|
|
21
|
+
tells a new user to run, used to exit `2` with `--account is required` on a
|
|
22
|
+
fresh config. With no account connected the error says so; with several it
|
|
23
|
+
lists them. Both still exit `2` and send nothing else. An account given
|
|
24
|
+
explicitly is used as before, with no lookup. An empty or blank `--account`
|
|
25
|
+
or `CURVIATE_ACCOUNT` is a usage error (exit `2`), never a stand-in for
|
|
26
|
+
omitting it. `--preview` still requires `--account`, since it calls nothing.
|
|
27
|
+
- **`inbox messages` explains when `--mode cache_only` can be served.** The
|
|
28
|
+
store answers a message listing only for an unfiltered first page of a chat
|
|
29
|
+
whose whole message set fits in that one page (`--limit`, at most 25), and
|
|
30
|
+
only after a walk of the chat completed. Any fetched unfiltered first page
|
|
31
|
+
restarts that walk; `--all` walks to the end and closes it. The command's
|
|
32
|
+
help and the README's retrieval section now say so, and an exit `14` on an
|
|
33
|
+
unfiltered, uncursored `inbox messages` adds a `hint:` line. A read carrying
|
|
34
|
+
`--before`, `--after` or `--cursor` is never served from the store and gets
|
|
35
|
+
no hint, since `--all` would not help it. The exit code is unchanged.
|
|
36
|
+
- **Help for `post user-reactions` and `profile --reactions` says items carry
|
|
37
|
+
no time of the reaction.** `parent_post.created_at` is when the post was
|
|
38
|
+
created, and an old post can pick up a fresh reaction, so it is not a
|
|
39
|
+
recency signal and the listing cannot be filtered by date. Read a bounded
|
|
40
|
+
number of items instead: without `--all`, `--limit` caps the read at one
|
|
41
|
+
page.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- **The published bundle no longer carries typographic characters from source
|
|
46
|
+
comments.** The bundler keeps some comments, and two in the exit-code table
|
|
47
|
+
shipped em dashes. They are rewritten, and the pre-publish scan of the built
|
|
48
|
+
bundle now blocks the same typographic characters the README and CHANGELOG
|
|
49
|
+
scan blocks.
|
|
50
|
+
- **`profile <id> --sections` and `profile me --sections` now show the
|
|
51
|
+
sections they fetch.** The default output dropped them, so the flag looked
|
|
52
|
+
like it did nothing. Each requested section is added under its own name
|
|
53
|
+
(`--sections education,skills` adds `education` and `skills`,
|
|
54
|
+
`linkedin_*` adds all nine), `null` when the response did not include it.
|
|
55
|
+
Sections that were not requested stay out, output without `--sections` is
|
|
56
|
+
unchanged, and `--verbose` still prints the full response.
|
|
57
|
+
|
|
9
58
|
## [0.33.0] - 2026-09-14
|
|
10
59
|
|
|
11
60
|
One addition, one change and twelve fixes. Several refuse input that used to
|
package/README.md
CHANGED
|
@@ -251,7 +251,7 @@ curviate job get "https://www.linkedin.com/jobs/view/4428113858" --account acc_1
|
|
|
251
251
|
Company commands (`curviate company ...`) are Core-tier reads. `company <id>` accepts a public
|
|
252
252
|
handle (the slug in `linkedin.com/company/<handle>`) or a numeric id; the four sub-resource
|
|
253
253
|
commands require the company's **numeric provider id**, the `id` field `company <id>` returns.
|
|
254
|
-
`--account` (or a configured default account) is required on all of them.
|
|
254
|
+
`--account` (or a configured default account) is required on all of them, unless exactly one account is connected.
|
|
255
255
|
|
|
256
256
|
### 1. Retrieve a company, then list its employees
|
|
257
257
|
|
|
@@ -540,6 +540,16 @@ this API simply holds no copy, so re-checking the id is the wrong move. It is
|
|
|
540
540
|
not a failure either. The fix is another mode, and it is never worth retrying
|
|
541
541
|
as sent, because the answer cannot change until you change the mode.
|
|
542
542
|
|
|
543
|
+
`inbox messages` is the strictest case. The store answers it only for an
|
|
544
|
+
unfiltered, uncursored first page, only after a walk of the whole chat reached
|
|
545
|
+
its end, and only when the chat's whole message set fits in that one page
|
|
546
|
+
(`--limit`, at most 25). Any unfiltered page fetched from LinkedIn (such as
|
|
547
|
+
`--mode live` without `--all`) restarts the walk, and
|
|
548
|
+
`inbox messages <chat_id> --all` walks to the end and closes it. A read
|
|
549
|
+
carrying `--before`, `--after` or `--cursor` is never served from the store and
|
|
550
|
+
`--all` does not change that, so a chat with more messages than one page holds
|
|
551
|
+
exits `14` under `--mode cache_only` however it is walked.
|
|
552
|
+
|
|
543
553
|
```bash
|
|
544
554
|
# The default: a fresh stored copy if there is one, otherwise fetch
|
|
545
555
|
curviate profile me --account acc_1 --json
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
slimAccountGet,
|
|
7
7
|
slimAccountList,
|
|
8
8
|
slimAccountListItem
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XP2LN6F6.js";
|
|
10
10
|
import {
|
|
11
11
|
buildPreviewOutput
|
|
12
12
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -22,19 +22,19 @@ import {
|
|
|
22
22
|
resolveEffectiveConfig,
|
|
23
23
|
streamAll,
|
|
24
24
|
writeNdjsonItem
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-7JU4IXXG.js";
|
|
26
26
|
import {
|
|
27
27
|
AUTH_NEEDED
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-XZJQQJBE.js";
|
|
29
29
|
import {
|
|
30
30
|
createClient
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-DCZR4M7G.js";
|
|
32
32
|
import {
|
|
33
33
|
GLOBAL_FLAGS,
|
|
34
34
|
READ_SINGLE_FLAGS,
|
|
35
35
|
WRITE_SINGLE_FLAGS,
|
|
36
36
|
defaultReadStdin
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XDQHNUEU.js";
|
|
38
38
|
|
|
39
39
|
// src/commands/account.ts
|
|
40
40
|
import { defineCommand } from "citty";
|
|
@@ -201,7 +201,7 @@ function resolveOutputOpts(flags) {
|
|
|
201
201
|
async function handleError(err, outOpts, out) {
|
|
202
202
|
const { CurviateError } = await import("@curviate/sdk");
|
|
203
203
|
if (err instanceof CurviateError) {
|
|
204
|
-
const { getExitCode } = await import("./exit-codes-
|
|
204
|
+
const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
|
|
205
205
|
renderError(err, outOpts, out);
|
|
206
206
|
process.exit(getExitCode(err));
|
|
207
207
|
}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-UEAX6KUB.js";
|
|
19
19
|
import {
|
|
20
20
|
requireAccount
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MNDXMGPX.js";
|
|
22
22
|
import {
|
|
23
23
|
buildPreviewOutput
|
|
24
24
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
renderSuccess,
|
|
29
29
|
renderUnexpectedError,
|
|
30
30
|
resolveEffectiveConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7JU4IXXG.js";
|
|
32
32
|
import {
|
|
33
33
|
createClient,
|
|
34
34
|
downloadBinary
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-DCZR4M7G.js";
|
|
36
36
|
import {
|
|
37
37
|
READ_SINGLE_FLAGS,
|
|
38
38
|
WRITE_FLAGS,
|
|
39
39
|
resolveTextOrStdin
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XDQHNUEU.js";
|
|
41
41
|
|
|
42
42
|
// src/commands/message.ts
|
|
43
43
|
import { defineCommand } from "citty";
|
|
@@ -75,7 +75,7 @@ var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
|
|
|
75
75
|
async function handleSdkError(err, outOpts, out) {
|
|
76
76
|
const { CurviateError } = await import("@curviate/sdk");
|
|
77
77
|
if (err instanceof CurviateError) {
|
|
78
|
-
const { getExitCode } = await import("./exit-codes-
|
|
78
|
+
const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
|
|
79
79
|
renderError(err, outOpts, out);
|
|
80
80
|
process.exit(getExitCode(err));
|
|
81
81
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readablePage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7JU4IXXG.js";
|
|
5
5
|
import {
|
|
6
6
|
getExitCode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XZJQQJBE.js";
|
|
8
8
|
import {
|
|
9
9
|
assertNoStdinPlaceholder
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XDQHNUEU.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/path-safety.ts
|
|
13
13
|
var UNSAFE_CHARS = /[\u0000-\u0020\u007F/\\?#%]/;
|
|
@@ -74,6 +74,7 @@ function listConnectedAccounts(client) {
|
|
|
74
74
|
if (cached) return cached;
|
|
75
75
|
const pending = (async () => {
|
|
76
76
|
const accounts = [];
|
|
77
|
+
let unreadableRow = false;
|
|
77
78
|
let cursor;
|
|
78
79
|
for (let page = 0; page < MAX_LOOKUP_PAGES; page++) {
|
|
79
80
|
const params = { limit: 250 };
|
|
@@ -84,8 +85,9 @@ function listConnectedAccounts(client) {
|
|
|
84
85
|
for (const item of result.items) {
|
|
85
86
|
const account = toConnectedAccount(item);
|
|
86
87
|
if (account) accounts.push(account);
|
|
88
|
+
else unreadableRow = true;
|
|
87
89
|
}
|
|
88
|
-
if (!result.cursor) return { accounts, complete:
|
|
90
|
+
if (!result.cursor) return { accounts, complete: !unreadableRow };
|
|
89
91
|
cursor = result.cursor;
|
|
90
92
|
}
|
|
91
93
|
return { accounts, complete: false };
|
|
@@ -107,14 +109,67 @@ function matchAccounts(accounts, selector) {
|
|
|
107
109
|
if (exactName.length > 0) return exactName;
|
|
108
110
|
return accounts.filter((a) => a.fullName?.toLowerCase().startsWith(needle));
|
|
109
111
|
}
|
|
112
|
+
async function listOrExit(client, out, purpose) {
|
|
113
|
+
try {
|
|
114
|
+
return await listConnectedAccounts(client);
|
|
115
|
+
} catch (err) {
|
|
116
|
+
const { CurviateError } = await import("@curviate/sdk");
|
|
117
|
+
if (err instanceof CurviateError) {
|
|
118
|
+
const e = err;
|
|
119
|
+
out.stderr.write(`error: [${e.code}] could not look up connected accounts to ${purpose}: ${e.message}
|
|
120
|
+
`);
|
|
121
|
+
process.exit(getExitCode(e));
|
|
122
|
+
}
|
|
123
|
+
throw err;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
var SET_ACCOUNT = "Pass --account, set CURVIATE_ACCOUNT, or run `curviate config set-account`.";
|
|
127
|
+
async function soleConnectedAccount(client, flags, out) {
|
|
128
|
+
if (flags.preview === true) {
|
|
129
|
+
out.stderr.write(`error: --account is required with --preview, which does not call the API to find it. ${SET_ACCOUNT}
|
|
130
|
+
`);
|
|
131
|
+
process.exit(2);
|
|
132
|
+
}
|
|
133
|
+
const listed = await listOrExit(client, out, "pick the account for this command");
|
|
134
|
+
if (!listed.complete) {
|
|
135
|
+
out.stderr.write(
|
|
136
|
+
`error: [ACCOUNT_LIST_TRUNCATED] --account is required: the connected accounts could not be read in full (more of them than the resolver reads, or an entry it could not read), so none can be picked for you. ${SET_ACCOUNT}
|
|
137
|
+
`
|
|
138
|
+
);
|
|
139
|
+
process.exit(2);
|
|
140
|
+
}
|
|
141
|
+
const { accounts } = listed;
|
|
142
|
+
if (accounts.length === 0) {
|
|
143
|
+
out.stderr.write(
|
|
144
|
+
"error: no LinkedIn account is connected to this workspace yet. Connect one with `curviate account link`, then retry.\n"
|
|
145
|
+
);
|
|
146
|
+
process.exit(2);
|
|
147
|
+
}
|
|
148
|
+
if (accounts.length > 1) {
|
|
149
|
+
out.stderr.write(
|
|
150
|
+
`error: --account is required: ${accounts.length} accounts are connected (${describeAll(accounts)}). ${SET_ACCOUNT}
|
|
151
|
+
`
|
|
152
|
+
);
|
|
153
|
+
process.exit(2);
|
|
154
|
+
}
|
|
155
|
+
const resolved = accounts[0].accountId;
|
|
156
|
+
const bad = pathSegmentViolation(resolved);
|
|
157
|
+
if (bad !== null) {
|
|
158
|
+
out.stderr.write(pathSegmentErrorMessage("the connected account id", resolved, bad));
|
|
159
|
+
process.exit(2);
|
|
160
|
+
}
|
|
161
|
+
return resolved;
|
|
162
|
+
}
|
|
110
163
|
async function requireAccount(client, flags, out) {
|
|
111
164
|
const account = flags.account;
|
|
112
|
-
if (
|
|
165
|
+
if (account !== void 0 && account.trim() === "") {
|
|
113
166
|
out.stderr.write(
|
|
114
|
-
|
|
167
|
+
`error: --account was given an empty value. ${SET_ACCOUNT} Omit it entirely to use the only connected account.
|
|
168
|
+
`
|
|
115
169
|
);
|
|
116
170
|
process.exit(2);
|
|
117
171
|
}
|
|
172
|
+
if (!account) return soleConnectedAccount(client, flags, out);
|
|
118
173
|
const selector = account.trim();
|
|
119
174
|
assertNoStdinPlaceholder("the --account value", [selector]);
|
|
120
175
|
const redirecting = redirectingViolation(selector);
|
|
@@ -130,24 +185,10 @@ async function requireAccount(client, flags, out) {
|
|
|
130
185
|
);
|
|
131
186
|
return selector;
|
|
132
187
|
}
|
|
133
|
-
|
|
134
|
-
try {
|
|
135
|
-
listed = await listConnectedAccounts(client);
|
|
136
|
-
} catch (err) {
|
|
137
|
-
const { CurviateError } = await import("@curviate/sdk");
|
|
138
|
-
if (err instanceof CurviateError) {
|
|
139
|
-
const e = err;
|
|
140
|
-
out.stderr.write(
|
|
141
|
-
`error: [${e.code}] could not look up connected accounts to resolve --account "${selector}": ${e.message}
|
|
142
|
-
`
|
|
143
|
-
);
|
|
144
|
-
process.exit(getExitCode(e));
|
|
145
|
-
}
|
|
146
|
-
throw err;
|
|
147
|
-
}
|
|
188
|
+
const listed = await listOrExit(client, out, `resolve --account "${selector}"`);
|
|
148
189
|
if (!listed.complete) {
|
|
149
190
|
out.stderr.write(
|
|
150
|
-
`error: [ACCOUNT_LIST_TRUNCATED] --account "${selector}" cannot be resolved by name: this API key has more
|
|
191
|
+
`error: [ACCOUNT_LIST_TRUNCATED] --account "${selector}" cannot be resolved by name: the connected accounts could not be read in full (this API key has more of them than the resolver reads, which stops after ${MAX_LOOKUP_PAGES} pages of 250, or the list carried an entry it could not read), so the name would be matched against an incomplete list and a single match would not prove there is only one. Pass the account id instead; an id is used as given and needs no lookup.
|
|
151
192
|
`
|
|
152
193
|
);
|
|
153
194
|
process.exit(2);
|
|
@@ -86,7 +86,7 @@ var GLOBAL_FLAGS = {
|
|
|
86
86
|
},
|
|
87
87
|
account: {
|
|
88
88
|
type: "string",
|
|
89
|
-
description: "Account id for account-scoped commands."
|
|
89
|
+
description: "Account id for account-scoped commands. Optional when exactly one account is connected."
|
|
90
90
|
},
|
|
91
91
|
"base-url": {
|
|
92
92
|
type: "string",
|
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// src/lib/sections.ts
|
|
4
|
+
var SECTION_BASE_NAMES = [
|
|
5
|
+
"experience",
|
|
6
|
+
"education",
|
|
7
|
+
"languages",
|
|
8
|
+
"skills",
|
|
9
|
+
"certifications",
|
|
10
|
+
"volunteer_experience",
|
|
11
|
+
"projects",
|
|
12
|
+
"recommendations",
|
|
13
|
+
"interests"
|
|
14
|
+
];
|
|
15
|
+
var VALID_LINKEDIN_SECTIONS = /* @__PURE__ */ new Set([
|
|
16
|
+
"linkedin_*",
|
|
17
|
+
...SECTION_BASE_NAMES.flatMap((n) => [`linkedin_${n}`, `linkedin_${n}_preview`])
|
|
18
|
+
]);
|
|
19
|
+
var CANONICAL_SECTION_VALUES = [
|
|
20
|
+
"linkedin_*",
|
|
21
|
+
...SECTION_BASE_NAMES.map((n) => `linkedin_${n}`)
|
|
22
|
+
];
|
|
23
|
+
function parseSectionsFlag(raw) {
|
|
24
|
+
const values = raw.split(",").map((s) => s.trim()).filter(Boolean);
|
|
25
|
+
const sections = [];
|
|
26
|
+
for (const value of values) {
|
|
27
|
+
const canonical = value.startsWith("linkedin_") ? value : `linkedin_${value}`;
|
|
28
|
+
if (!VALID_LINKEDIN_SECTIONS.has(canonical)) {
|
|
29
|
+
return {
|
|
30
|
+
ok: false,
|
|
31
|
+
error: `error: --sections: unknown section "${value}". Valid values: ${CANONICAL_SECTION_VALUES.join(", ")} (each also has a _preview variant).
|
|
32
|
+
`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
sections.push(canonical);
|
|
36
|
+
}
|
|
37
|
+
return { ok: true, sections };
|
|
38
|
+
}
|
|
39
|
+
function sectionKeys(sections) {
|
|
40
|
+
if (sections.includes("linkedin_*")) return [...SECTION_BASE_NAMES];
|
|
41
|
+
return [...new Set(sections.map((s) => s.replace(/^linkedin_/, "").replace(/_preview$/, "")))];
|
|
42
|
+
}
|
|
43
|
+
|
|
3
44
|
// src/lib/slim.ts
|
|
4
45
|
function synthesizeCurrentPosition(workExperience) {
|
|
5
46
|
if (!Array.isArray(workExperience) || workExperience.length === 0) {
|
|
@@ -33,6 +74,16 @@ function getSpecifics(d) {
|
|
|
33
74
|
function extractExperience(specifics) {
|
|
34
75
|
return Array.isArray(specifics?.["experience"]) ? specifics["experience"] : [];
|
|
35
76
|
}
|
|
77
|
+
function withRequestedSections(slim, sections) {
|
|
78
|
+
if (!sections?.length) return slim;
|
|
79
|
+
return (data) => {
|
|
80
|
+
const d = data !== null && typeof data === "object" ? data : {};
|
|
81
|
+
const specifics = getSpecifics(d);
|
|
82
|
+
const out = slim(data);
|
|
83
|
+
for (const key of sectionKeys(sections)) out[key] = specifics?.[key] ?? null;
|
|
84
|
+
return out;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
36
87
|
function slimProfileMe(data) {
|
|
37
88
|
const d = data !== null && data !== void 0 && typeof data === "object" ? data : {};
|
|
38
89
|
const specifics = getSpecifics(d);
|
|
@@ -286,6 +337,8 @@ function slimCompanyInvitableFollowers(data) {
|
|
|
286
337
|
}
|
|
287
338
|
|
|
288
339
|
export {
|
|
340
|
+
parseSectionsFlag,
|
|
341
|
+
withRequestedSections,
|
|
289
342
|
slimProfileMe,
|
|
290
343
|
slimProfile,
|
|
291
344
|
slimInviteSentItem,
|
|
@@ -66,7 +66,7 @@ var EXIT_CODE_MAP = {
|
|
|
66
66
|
// may exist perfectly well on LinkedIn, and this API simply holds no copy of
|
|
67
67
|
// it, so it is NOT "not found" and re-checking the id is the wrong move. It
|
|
68
68
|
// is not 1 either: nothing failed. It is user_fixable and not retryable AS
|
|
69
|
-
// SENT
|
|
69
|
+
// SENT: the fix is another mode (`refill` fetches it once, `auto` fetches
|
|
70
70
|
// now), which is the same shape as exit 2 but reached without a malformed
|
|
71
71
|
// request, so it earns its own number rather than muddying either.
|
|
72
72
|
// A 502 under cache_only stays 7: "we could not look" and "we hold nothing"
|
|
@@ -76,7 +76,7 @@ var EXIT_CODE_MAP = {
|
|
|
76
76
|
//
|
|
77
77
|
// Each of these is returned by a `/v1` route, the `/v1` catch-all, or a
|
|
78
78
|
// shared handler one of them calls, and each was absent from the SDK's
|
|
79
|
-
// exported union until 0.30.0
|
|
79
|
+
// exported union until 0.30.0, so it decoded to `INTERNAL` and landed here
|
|
80
80
|
// on exit 1, which reads as "the tool broke" for a refusal that is usually
|
|
81
81
|
// the caller's to fix. They are bucketed by what the caller does next, taken
|
|
82
82
|
// from each code's own HTTP status and retry contract rather than by name.
|
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
parseBetaFlag,
|
|
9
9
|
restoreLiteralDashes,
|
|
10
10
|
setBetaOverride
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XDQHNUEU.js";
|
|
12
12
|
|
|
13
13
|
// src/cli.ts
|
|
14
14
|
import { defineCommand } from "citty";
|
|
@@ -392,7 +392,7 @@ async function dispatch(root, rawArgs) {
|
|
|
392
392
|
}
|
|
393
393
|
const { CurviateError } = await import("@curviate/sdk");
|
|
394
394
|
if (err instanceof CurviateError) {
|
|
395
|
-
const { getExitCode } = await import("./exit-codes-
|
|
395
|
+
const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
|
|
396
396
|
process.exit(getExitCode(err));
|
|
397
397
|
}
|
|
398
398
|
process.exit(code === "EARG" ? 2 : 1);
|
|
@@ -414,30 +414,30 @@ var main = defineCommand({
|
|
|
414
414
|
// Subcommand registry, names and descriptions are static for help rendering;
|
|
415
415
|
// the handler implementation is loaded lazily on first invocation.
|
|
416
416
|
subCommands: {
|
|
417
|
-
setup: () => import("./setup-
|
|
418
|
-
doctor: () => import("./doctor-
|
|
419
|
-
login: () => import("./login-
|
|
420
|
-
config: () => import("./config-
|
|
417
|
+
setup: () => import("./setup-ANHJZJ2S.js").then((m) => m.setupCommand),
|
|
418
|
+
doctor: () => import("./doctor-Z6OSCGKT.js").then((m) => m.doctorCommand),
|
|
419
|
+
login: () => import("./login-YTVPIN27.js").then((m) => m.loginCommand),
|
|
420
|
+
config: () => import("./config-RUBXWFQ3.js").then((m) => m.configCommand),
|
|
421
421
|
// ---------------------------------------------------------------------------
|
|
422
422
|
// Noun groups, lazy-loaded on first invocation.
|
|
423
423
|
// ---------------------------------------------------------------------------
|
|
424
|
-
profile: () => import("./profile-
|
|
425
|
-
company: () => import("./company-
|
|
426
|
-
job: () => import("./job-
|
|
427
|
-
connect: () => import("./connect-
|
|
428
|
-
search: () => import("./search-
|
|
429
|
-
inbox: () => import("./inbox-
|
|
430
|
-
inboxes: () => import("./inboxes-
|
|
431
|
-
message: () => import("./message-
|
|
432
|
-
post: () => import("./post-
|
|
433
|
-
comment: () => import("./comment-
|
|
434
|
-
account: () => import("./account-
|
|
435
|
-
webhook: () => import("./webhook-
|
|
436
|
-
"sales-nav": () => import("./sales-nav-
|
|
437
|
-
recruiter: () => import("./recruiter-
|
|
438
|
-
group: () => import("./group-
|
|
439
|
-
feed: () => import("./feed-
|
|
440
|
-
notification: () => import("./notification-
|
|
424
|
+
profile: () => import("./profile-TBKKIICM.js").then((m) => m.profileCommand),
|
|
425
|
+
company: () => import("./company-OWND3W3L.js").then((m) => m.companyCommand),
|
|
426
|
+
job: () => import("./job-ESKS2LDJ.js").then((m) => m.jobCommand),
|
|
427
|
+
connect: () => import("./connect-3E7EC5ZM.js").then((m) => m.connectCommand),
|
|
428
|
+
search: () => import("./search-CS6VN5AG.js").then((m) => m.searchCommand),
|
|
429
|
+
inbox: () => import("./inbox-DQLX2LR7.js").then((m) => m.inboxCommand),
|
|
430
|
+
inboxes: () => import("./inboxes-WMNHOPY7.js").then((m) => m.inboxesCommand),
|
|
431
|
+
message: () => import("./message-5W2R3YHS.js").then((m) => m.messageCommand),
|
|
432
|
+
post: () => import("./post-NLI76K74.js").then((m) => m.postCommand),
|
|
433
|
+
comment: () => import("./comment-G6RB2PBZ.js").then((m) => m.commentCommand),
|
|
434
|
+
account: () => import("./account-463D5EVY.js").then((m) => m.accountCommand),
|
|
435
|
+
webhook: () => import("./webhook-NGMRJMQ5.js").then((m) => m.webhookCommand),
|
|
436
|
+
"sales-nav": () => import("./sales-nav-SW6WJVMD.js").then((m) => m.salesNavCommand),
|
|
437
|
+
recruiter: () => import("./recruiter-AEJRHIX5.js").then((m) => m.recruiterCommand),
|
|
438
|
+
group: () => import("./group-KDJHY2IM.js").then((m) => m.groupCommand),
|
|
439
|
+
feed: () => import("./feed-VDTFIMKN.js").then((m) => m.feedCommand),
|
|
440
|
+
notification: () => import("./notification-IGNUH2GR.js").then((m) => m.notificationCommand)
|
|
441
441
|
},
|
|
442
442
|
async run() {
|
|
443
443
|
const { runMain } = await import("citty");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZJ7D3NFS.js";
|
|
5
5
|
import {
|
|
6
6
|
AttachError,
|
|
7
7
|
describeAttachment,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import "./chunk-UEAX6KUB.js";
|
|
12
12
|
import {
|
|
13
13
|
requireAccount
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MNDXMGPX.js";
|
|
15
15
|
import {
|
|
16
16
|
buildPreviewOutput
|
|
17
17
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
resolveEffectiveConfig,
|
|
26
26
|
streamAll,
|
|
27
27
|
writeNdjsonItem
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-7JU4IXXG.js";
|
|
29
|
+
import "./chunk-XZJQQJBE.js";
|
|
30
30
|
import {
|
|
31
31
|
createClient
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-DCZR4M7G.js";
|
|
33
33
|
import {
|
|
34
34
|
GLOBAL_FLAGS,
|
|
35
35
|
WRITE_SINGLE_FLAGS,
|
|
36
36
|
resolveTextOrStdin
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XDQHNUEU.js";
|
|
38
38
|
|
|
39
39
|
// src/commands/comment.ts
|
|
40
40
|
import { defineCommand } from "citty";
|
|
@@ -68,7 +68,7 @@ function buildListQuery(flags) {
|
|
|
68
68
|
async function handleSdkError(err, outOpts, out) {
|
|
69
69
|
const { CurviateError } = await import("@curviate/sdk");
|
|
70
70
|
if (err instanceof CurviateError) {
|
|
71
|
-
const { getExitCode } = await import("./exit-codes-
|
|
71
|
+
const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
|
|
72
72
|
renderError(err, outOpts, out);
|
|
73
73
|
process.exit(getExitCode(err));
|
|
74
74
|
}
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
slimSearchJobs,
|
|
8
8
|
slimSearchPeople,
|
|
9
9
|
slimSearchPosts
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XP2LN6F6.js";
|
|
11
11
|
import {
|
|
12
12
|
sentAsNotice
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BN7L7WSY.js";
|
|
14
14
|
import "./chunk-UWO2D4HW.js";
|
|
15
15
|
import "./chunk-HOQ7EUHJ.js";
|
|
16
16
|
import {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-UEAX6KUB.js";
|
|
24
24
|
import {
|
|
25
25
|
requireAccount
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MNDXMGPX.js";
|
|
27
27
|
import {
|
|
28
28
|
buildPreviewOutput
|
|
29
29
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -38,17 +38,17 @@ import {
|
|
|
38
38
|
resolveEffectiveConfig,
|
|
39
39
|
streamAll,
|
|
40
40
|
writeNdjsonItem
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-7JU4IXXG.js";
|
|
42
|
+
import "./chunk-XZJQQJBE.js";
|
|
43
43
|
import {
|
|
44
44
|
createClient
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-DCZR4M7G.js";
|
|
46
46
|
import {
|
|
47
47
|
GLOBAL_FLAGS,
|
|
48
48
|
NON_STREAM_FLAGS,
|
|
49
49
|
WRITE_FLAGS,
|
|
50
50
|
resolveTextOrStdin
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-XDQHNUEU.js";
|
|
52
52
|
|
|
53
53
|
// src/commands/company.ts
|
|
54
54
|
import { defineCommand } from "citty";
|
|
@@ -88,7 +88,7 @@ async function resolveCompanyId(ns, raw) {
|
|
|
88
88
|
async function handleSdkError(err, outOpts, out) {
|
|
89
89
|
const { CurviateError } = await import("@curviate/sdk");
|
|
90
90
|
if (err instanceof CurviateError) {
|
|
91
|
-
const { getExitCode } = await import("./exit-codes-
|
|
91
|
+
const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
|
|
92
92
|
renderError(err, outOpts, out);
|
|
93
93
|
process.exit(getExitCode(err));
|
|
94
94
|
}
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
setActiveProfile,
|
|
13
13
|
updateProfileField,
|
|
14
14
|
withoutUserinfo
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DCZR4M7G.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XDQHNUEU.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/config.ts
|
|
21
21
|
import { defineCommand } from "citty";
|