@curviate/cli 0.3.0 → 0.4.1
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 +19 -0
- package/dist/{account-3I63RFVN.js → account-47TRPUKL.js} +2 -2
- package/dist/{chunk-QQRTODHN.js → chunk-52RZLSWP.js} +12 -1
- package/dist/{chunk-7TWHAKKA.js → chunk-5NS2G4WQ.js} +4 -1
- package/dist/{chunk-UPNQPAJG.js → chunk-U6ACUNLU.js} +1 -1
- package/dist/cli.js +13 -13
- package/dist/{company-EARWRU2N.js → company-4MUABENR.js} +3 -3
- package/dist/{config-E2XQNLSX.js → config-6PNGYL5E.js} +1 -1
- package/dist/{connect-LRYVZCN6.js → connect-ZXD7P5CA.js} +2 -2
- package/dist/{inbox-O4ZETUIU.js → inbox-ME4TXGFV.js} +2 -2
- package/dist/{login-PUTCMS5B.js → login-UJQGIP7S.js} +1 -1
- package/dist/{message-A3XMZCQA.js → message-KAESYHVJ.js} +2 -2
- package/dist/{post-HOXZPFVI.js → post-VDQF23WS.js} +87 -25
- package/dist/{profile-RU472SNL.js → profile-CUVVESMY.js} +107 -9
- package/dist/{recruiter-7SE3YCVZ.js → recruiter-QKJKOWD7.js} +2 -2
- package/dist/{sales-nav-E3TH7CL7.js → sales-nav-UL2H6J6V.js} +2 -2
- package/dist/{search-ZPGKDJIT.js → search-M4WK3PDC.js} +2 -2
- package/dist/{webhook-VSM72KL5.js → webhook-2SSNW25K.js} +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,25 @@ a new command or flag is a minor; a breaking command/flag/exit-code change is a
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.4.1] - 2026-06-29
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Updated `@curviate/sdk` dependency to `^0.2.1`, which fixes `message delete` and
|
|
16
|
+
`message react` failing with an unexpected `account_id` parameter rejection. The SDK
|
|
17
|
+
now correctly omits `account_id` for those two operations.
|
|
18
|
+
|
|
19
|
+
## [0.4.0] - 2026-06-28
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- `profile me` slim now includes `current_position` (synthesized from `work_experience[0]`
|
|
24
|
+
when `--sections experience` is passed), achieving parity with `profile <id>` slim.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- `repository.url` in `package.json` normalized to the npm-canonical `git+https://` prefix.
|
|
29
|
+
|
|
11
30
|
## [0.3.0] - 2026-06-28
|
|
12
31
|
|
|
13
32
|
### Added
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
renderSuccess,
|
|
12
12
|
renderUnexpectedError,
|
|
13
13
|
resolveEffectiveConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U6ACUNLU.js";
|
|
15
15
|
import {
|
|
16
16
|
GLOBAL_FLAGS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-52RZLSWP.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/account.ts
|
|
20
20
|
import { defineCommand } from "citty";
|
|
@@ -187,6 +187,16 @@ var GLOBAL_FLAGS = {
|
|
|
187
187
|
default: false
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
|
+
var WRITE_FLAGS = {
|
|
191
|
+
"api-key": GLOBAL_FLAGS["api-key"],
|
|
192
|
+
profile: GLOBAL_FLAGS.profile,
|
|
193
|
+
account: GLOBAL_FLAGS.account,
|
|
194
|
+
"base-url": GLOBAL_FLAGS["base-url"],
|
|
195
|
+
timeout: GLOBAL_FLAGS.timeout,
|
|
196
|
+
json: GLOBAL_FLAGS.json,
|
|
197
|
+
preview: GLOBAL_FLAGS.preview,
|
|
198
|
+
verbose: GLOBAL_FLAGS.verbose
|
|
199
|
+
};
|
|
190
200
|
|
|
191
201
|
export {
|
|
192
202
|
getConfigPath,
|
|
@@ -196,5 +206,6 @@ export {
|
|
|
196
206
|
renameProfile,
|
|
197
207
|
removeProfile,
|
|
198
208
|
updateProfileField,
|
|
199
|
-
GLOBAL_FLAGS
|
|
209
|
+
GLOBAL_FLAGS,
|
|
210
|
+
WRITE_FLAGS
|
|
200
211
|
};
|
|
@@ -33,6 +33,8 @@ function slimProfileMe(data) {
|
|
|
33
33
|
mailbox_id: org["mailbox_id"] ?? null,
|
|
34
34
|
name: org["name"] ?? null
|
|
35
35
|
}));
|
|
36
|
+
const rawWE = Array.isArray(d["work_experience"]) ? d["work_experience"] : [];
|
|
37
|
+
const currentPosition = synthesizeCurrentPosition(rawWE);
|
|
36
38
|
return {
|
|
37
39
|
provider_id: d["provider_id"] ?? null,
|
|
38
40
|
first_name: d["first_name"] ?? null,
|
|
@@ -42,7 +44,8 @@ function slimProfileMe(data) {
|
|
|
42
44
|
email: d["email"] ?? null,
|
|
43
45
|
occupation: d["occupation"] ?? null,
|
|
44
46
|
is_premium: d["is_premium"] ?? null,
|
|
45
|
-
organizations
|
|
47
|
+
organizations,
|
|
48
|
+
current_position: currentPosition
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
51
|
function slimProfile(data) {
|
package/dist/cli.js
CHANGED
|
@@ -134,22 +134,22 @@ var main = defineCommand({
|
|
|
134
134
|
// Subcommand registry — names and descriptions are static for help rendering;
|
|
135
135
|
// the handler implementation is loaded lazily on first invocation.
|
|
136
136
|
subCommands: {
|
|
137
|
-
login: () => import("./login-
|
|
138
|
-
config: () => import("./config-
|
|
137
|
+
login: () => import("./login-UJQGIP7S.js").then((m) => m.loginCommand),
|
|
138
|
+
config: () => import("./config-6PNGYL5E.js").then((m) => m.configCommand),
|
|
139
139
|
// ---------------------------------------------------------------------------
|
|
140
140
|
// Noun groups — lazy-loaded on first invocation.
|
|
141
141
|
// ---------------------------------------------------------------------------
|
|
142
|
-
profile: () => import("./profile-
|
|
143
|
-
company: () => import("./company-
|
|
144
|
-
connect: () => import("./connect-
|
|
145
|
-
search: () => import("./search-
|
|
146
|
-
inbox: () => import("./inbox-
|
|
147
|
-
message: () => import("./message-
|
|
148
|
-
post: () => import("./post-
|
|
149
|
-
account: () => import("./account-
|
|
150
|
-
webhook: () => import("./webhook-
|
|
151
|
-
"sales-nav": () => import("./sales-nav-
|
|
152
|
-
recruiter: () => import("./recruiter-
|
|
142
|
+
profile: () => import("./profile-CUVVESMY.js").then((m) => m.profileCommand),
|
|
143
|
+
company: () => import("./company-4MUABENR.js").then((m) => m.companyCommand),
|
|
144
|
+
connect: () => import("./connect-ZXD7P5CA.js").then((m) => m.connectCommand),
|
|
145
|
+
search: () => import("./search-M4WK3PDC.js").then((m) => m.searchCommand),
|
|
146
|
+
inbox: () => import("./inbox-ME4TXGFV.js").then((m) => m.inboxCommand),
|
|
147
|
+
message: () => import("./message-KAESYHVJ.js").then((m) => m.messageCommand),
|
|
148
|
+
post: () => import("./post-VDQF23WS.js").then((m) => m.postCommand),
|
|
149
|
+
account: () => import("./account-47TRPUKL.js").then((m) => m.accountCommand),
|
|
150
|
+
webhook: () => import("./webhook-2SSNW25K.js").then((m) => m.webhookCommand),
|
|
151
|
+
"sales-nav": () => import("./sales-nav-UL2H6J6V.js").then((m) => m.salesNavCommand),
|
|
152
|
+
recruiter: () => import("./recruiter-QKJKOWD7.js").then((m) => m.recruiterCommand)
|
|
153
153
|
},
|
|
154
154
|
async run() {
|
|
155
155
|
const { runMain } = await import("citty");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
slimCompany
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5NS2G4WQ.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveIdentifier
|
|
7
7
|
} from "./chunk-BNUTM6KD.js";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
renderSuccess,
|
|
12
12
|
renderUnexpectedError,
|
|
13
13
|
resolveEffectiveConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U6ACUNLU.js";
|
|
15
15
|
import {
|
|
16
16
|
GLOBAL_FLAGS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-52RZLSWP.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/company.ts
|
|
20
20
|
import { defineCommand } from "citty";
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
renderSuccess,
|
|
15
15
|
renderUnexpectedError,
|
|
16
16
|
resolveEffectiveConfig
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U6ACUNLU.js";
|
|
18
18
|
import {
|
|
19
19
|
GLOBAL_FLAGS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-52RZLSWP.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/connect.ts
|
|
23
23
|
import { defineCommand } from "citty";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
renderSuccess,
|
|
9
9
|
renderUnexpectedError,
|
|
10
10
|
resolveEffectiveConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U6ACUNLU.js";
|
|
12
12
|
import {
|
|
13
13
|
GLOBAL_FLAGS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-52RZLSWP.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/inbox.ts
|
|
17
17
|
import { defineCommand } from "citty";
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
renderSuccess,
|
|
20
20
|
renderUnexpectedError,
|
|
21
21
|
resolveEffectiveConfig
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-U6ACUNLU.js";
|
|
23
23
|
import {
|
|
24
24
|
GLOBAL_FLAGS
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-52RZLSWP.js";
|
|
26
26
|
|
|
27
27
|
// src/commands/message.ts
|
|
28
28
|
import { defineCommand } from "citty";
|
|
@@ -15,13 +15,15 @@ import {
|
|
|
15
15
|
renderSuccess,
|
|
16
16
|
renderUnexpectedError,
|
|
17
17
|
resolveEffectiveConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-U6ACUNLU.js";
|
|
19
19
|
import {
|
|
20
|
-
GLOBAL_FLAGS
|
|
21
|
-
|
|
20
|
+
GLOBAL_FLAGS,
|
|
21
|
+
WRITE_FLAGS
|
|
22
|
+
} from "./chunk-52RZLSWP.js";
|
|
22
23
|
|
|
23
24
|
// src/commands/post.ts
|
|
24
25
|
import { defineCommand } from "citty";
|
|
26
|
+
var VALID_REACTIONS = /* @__PURE__ */ new Set(["like", "celebrate", "support", "love", "insightful", "funny"]);
|
|
25
27
|
function buildOutputStreams() {
|
|
26
28
|
return {
|
|
27
29
|
stdout: { write: (s) => process.stdout.write(s) },
|
|
@@ -183,6 +185,7 @@ async function runPostComment(client, flags, out) {
|
|
|
183
185
|
const accountId = requireAccount(flags.account, out);
|
|
184
186
|
const postId = flags.postId ?? "";
|
|
185
187
|
const text = flags.text ?? "";
|
|
188
|
+
const replyTo = flags["reply-to"];
|
|
186
189
|
const attachPaths = normalizeAttachPaths(flags.attach);
|
|
187
190
|
let attachBuffers = [];
|
|
188
191
|
try {
|
|
@@ -195,11 +198,13 @@ async function runPostComment(client, flags, out) {
|
|
|
195
198
|
}
|
|
196
199
|
throw err;
|
|
197
200
|
}
|
|
201
|
+
const body = { text };
|
|
202
|
+
if (replyTo) body["comment_id"] = replyTo;
|
|
198
203
|
if (flags.preview) {
|
|
199
204
|
const preview = buildPreviewOutput({
|
|
200
205
|
method: "posts.comment",
|
|
201
206
|
args: { post_id: postId },
|
|
202
|
-
body
|
|
207
|
+
body,
|
|
203
208
|
account: accountId,
|
|
204
209
|
attachments: attachBuffers.map((buf, i) => ({
|
|
205
210
|
name: attachPaths[i] ? attachPaths[i].split("/").pop() ?? attachPaths[i] : `attachment_${i}`,
|
|
@@ -209,7 +214,6 @@ async function runPostComment(client, flags, out) {
|
|
|
209
214
|
out.stdout.write(JSON.stringify(preview) + "\n");
|
|
210
215
|
return;
|
|
211
216
|
}
|
|
212
|
-
const body = { text };
|
|
213
217
|
if (attachBuffers.length > 0) {
|
|
214
218
|
body["attachments"] = attachBuffers;
|
|
215
219
|
}
|
|
@@ -231,6 +235,7 @@ async function runPostComments(client, flags, out) {
|
|
|
231
235
|
const all = flags.all ?? false;
|
|
232
236
|
const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
|
|
233
237
|
const params = buildPaginationParams(flags);
|
|
238
|
+
if (flags["reply-to"]) params["comment_id"] = flags["reply-to"];
|
|
234
239
|
try {
|
|
235
240
|
if (all) {
|
|
236
241
|
const fn = (p) => ns.posts.listComments(postId, p);
|
|
@@ -252,11 +257,24 @@ async function runPostReact(client, flags, out) {
|
|
|
252
257
|
const accountId = requireAccount(flags.account, out);
|
|
253
258
|
const postId = flags.postId ?? "";
|
|
254
259
|
const reaction = flags.reaction ?? "";
|
|
260
|
+
if (!VALID_REACTIONS.has(reaction)) {
|
|
261
|
+
out.stderr.write(
|
|
262
|
+
`error: --reaction must be one of: like, celebrate, support, love, insightful, funny. Got: "${reaction}"
|
|
263
|
+
`
|
|
264
|
+
);
|
|
265
|
+
process.exit(2);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const commentId = flags["comment-id"];
|
|
269
|
+
const asOrganization = flags["as-organization"];
|
|
270
|
+
const body = { reaction };
|
|
271
|
+
if (commentId) body["comment_id"] = commentId;
|
|
272
|
+
if (asOrganization) body["as_organization"] = asOrganization;
|
|
255
273
|
if (flags.preview) {
|
|
256
274
|
const preview = buildPreviewOutput({
|
|
257
275
|
method: "posts.react",
|
|
258
276
|
args: { post_id: postId },
|
|
259
|
-
body
|
|
277
|
+
body,
|
|
260
278
|
account: accountId
|
|
261
279
|
});
|
|
262
280
|
out.stdout.write(JSON.stringify(preview) + "\n");
|
|
@@ -265,7 +283,7 @@ async function runPostReact(client, flags, out) {
|
|
|
265
283
|
const ns = client.account(accountId);
|
|
266
284
|
const outOpts = resolveOutputOpts(flags);
|
|
267
285
|
try {
|
|
268
|
-
const result = await ns.posts.react(postId,
|
|
286
|
+
const result = await ns.posts.react(postId, body);
|
|
269
287
|
renderSuccess(result, outOpts, out);
|
|
270
288
|
} catch (err) {
|
|
271
289
|
await handleSdkError(err, outOpts, out);
|
|
@@ -319,10 +337,13 @@ var postListCommand = defineCommand({
|
|
|
319
337
|
}
|
|
320
338
|
});
|
|
321
339
|
var postGetCommand = defineCommand({
|
|
322
|
-
meta: { name: "get", description: "Get a post by
|
|
340
|
+
meta: { name: "get", description: "Get a post by id." },
|
|
323
341
|
args: {
|
|
324
342
|
...GLOBAL_FLAGS,
|
|
325
|
-
postId: {
|
|
343
|
+
postId: {
|
|
344
|
+
type: "positional",
|
|
345
|
+
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id. To list replies to a comment, use 'post comments <post_id> --reply-to <comment_id>'."
|
|
346
|
+
}
|
|
326
347
|
},
|
|
327
348
|
async run({ args }) {
|
|
328
349
|
const flags = args;
|
|
@@ -345,10 +366,17 @@ var postGetCommand = defineCommand({
|
|
|
345
366
|
var postCreateCommand = defineCommand({
|
|
346
367
|
meta: { name: "create", description: "Create a new post." },
|
|
347
368
|
args: {
|
|
348
|
-
|
|
369
|
+
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
370
|
+
...WRITE_FLAGS,
|
|
349
371
|
text: { type: "positional", description: "Post body text." },
|
|
350
|
-
attach: {
|
|
351
|
-
|
|
372
|
+
attach: {
|
|
373
|
+
type: "string",
|
|
374
|
+
description: "Image/video/document to attach (repeatable for images; use --video-thumbnail when attaching a video). Supported: jpg, png, gif, mp4, pdf."
|
|
375
|
+
},
|
|
376
|
+
"video-thumbnail": {
|
|
377
|
+
type: "string",
|
|
378
|
+
description: "Thumbnail image for a video attachment (required when attaching a video post)."
|
|
379
|
+
}
|
|
352
380
|
},
|
|
353
381
|
async run({ args }) {
|
|
354
382
|
const flags = args;
|
|
@@ -369,12 +397,20 @@ var postCreateCommand = defineCommand({
|
|
|
369
397
|
}
|
|
370
398
|
});
|
|
371
399
|
var postCommentCommand = defineCommand({
|
|
372
|
-
meta: { name: "comment", description: "Comment on a post." },
|
|
400
|
+
meta: { name: "comment", description: "Comment on a post, or reply to a comment with --reply-to." },
|
|
373
401
|
args: {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
402
|
+
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
403
|
+
...WRITE_FLAGS,
|
|
404
|
+
postId: {
|
|
405
|
+
type: "positional",
|
|
406
|
+
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id; use --reply-to <comment_id> to reply to a specific comment within this post."
|
|
407
|
+
},
|
|
408
|
+
text: { type: "positional", description: "Comment text (max ~1,250 characters per LinkedIn limits)." },
|
|
409
|
+
attach: { type: "string", description: "Image to attach to the comment (optional; one image per comment)." },
|
|
410
|
+
"reply-to": {
|
|
411
|
+
type: "string",
|
|
412
|
+
description: "Post as a reply to this comment id (omit for a top-level comment on the post)."
|
|
413
|
+
}
|
|
378
414
|
},
|
|
379
415
|
async run({ args }) {
|
|
380
416
|
const flags = args;
|
|
@@ -395,10 +431,17 @@ var postCommentCommand = defineCommand({
|
|
|
395
431
|
}
|
|
396
432
|
});
|
|
397
433
|
var postCommentsCommand = defineCommand({
|
|
398
|
-
meta: { name: "comments", description: "List comments on a post." },
|
|
434
|
+
meta: { name: "comments", description: "List comments on a post. Use --reply-to to fetch replies to a specific comment." },
|
|
399
435
|
args: {
|
|
400
436
|
...GLOBAL_FLAGS,
|
|
401
|
-
postId: {
|
|
437
|
+
postId: {
|
|
438
|
+
type: "positional",
|
|
439
|
+
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id; to fetch replies to a comment, use --reply-to <comment_id>."
|
|
440
|
+
},
|
|
441
|
+
"reply-to": {
|
|
442
|
+
type: "string",
|
|
443
|
+
description: "Filter replies under this comment id (omit to list top-level comments on the post)."
|
|
444
|
+
}
|
|
402
445
|
},
|
|
403
446
|
async run({ args }) {
|
|
404
447
|
const flags = args;
|
|
@@ -419,11 +462,27 @@ var postCommentsCommand = defineCommand({
|
|
|
419
462
|
}
|
|
420
463
|
});
|
|
421
464
|
var postReactCommand = defineCommand({
|
|
422
|
-
meta: { name: "react", description: "React to a post." },
|
|
465
|
+
meta: { name: "react", description: "React to a post or comment." },
|
|
423
466
|
args: {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
467
|
+
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
468
|
+
...WRITE_FLAGS,
|
|
469
|
+
postId: {
|
|
470
|
+
type: "positional",
|
|
471
|
+
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id; to react to a comment within the post, use --comment-id <comment_id>."
|
|
472
|
+
},
|
|
473
|
+
reaction: {
|
|
474
|
+
type: "string",
|
|
475
|
+
required: true,
|
|
476
|
+
description: "Write-side reaction (lowercase). Write values: like, celebrate, support, love, insightful, funny. Read-side vocabulary (in the value and user_reacted response fields): LIKE, PRAISE, APPRECIATION, EMPATHY, INTEREST, ENTERTAINMENT. Confirmed write\u2192read mappings: like=LIKE, celebrate=PRAISE, insightful=INTEREST. (support, love, and funny are valid write values; their read-side pairings are unconfirmed.)"
|
|
477
|
+
},
|
|
478
|
+
"comment-id": {
|
|
479
|
+
type: "string",
|
|
480
|
+
description: "React to this specific comment id within the post (omit to react to the post itself)."
|
|
481
|
+
},
|
|
482
|
+
"as-organization": {
|
|
483
|
+
type: "string",
|
|
484
|
+
description: "React on behalf of an organization page (org id from 'profile me' organizations)."
|
|
485
|
+
}
|
|
427
486
|
},
|
|
428
487
|
async run({ args }) {
|
|
429
488
|
const flags = args;
|
|
@@ -447,7 +506,10 @@ var postReactionsCommand = defineCommand({
|
|
|
447
506
|
meta: { name: "reactions", description: "List reactions on a post." },
|
|
448
507
|
args: {
|
|
449
508
|
...GLOBAL_FLAGS,
|
|
450
|
-
postId: {
|
|
509
|
+
postId: {
|
|
510
|
+
type: "positional",
|
|
511
|
+
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id."
|
|
512
|
+
}
|
|
451
513
|
},
|
|
452
514
|
async run({ args }) {
|
|
453
515
|
const flags = args;
|
|
@@ -480,7 +542,7 @@ var postCommand = defineCommand({
|
|
|
480
542
|
},
|
|
481
543
|
async run() {
|
|
482
544
|
process.stderr.write(
|
|
483
|
-
'Usage: curviate post <subcommand>\n list\n get <post_id>\n create "<text>" [--attach <file>\u2026] [--video-thumbnail <file>]\n comment <post_id> "<text>" [--attach <file>]\n comments <post_id
|
|
545
|
+
'Usage: curviate post <subcommand>\n list\n get <post_id>\n create "<text>" [--attach <file>\u2026] [--video-thumbnail <file>]\n comment <post_id> "<text>" [--attach <file>] [--reply-to <comment_id>]\n comments <post_id> [--reply-to <comment_id>]\n react <post_id> --reaction <r> [--comment-id <comment_id>] [--as-organization <org_id>]\n reactions <post_id>\n'
|
|
484
546
|
);
|
|
485
547
|
}
|
|
486
548
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
slimProfile,
|
|
4
4
|
slimProfileMe
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5NS2G4WQ.js";
|
|
6
6
|
import {
|
|
7
7
|
buildPreviewOutput
|
|
8
8
|
} from "./chunk-R3VLWLVV.js";
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
renderSuccess,
|
|
19
19
|
renderUnexpectedError,
|
|
20
20
|
resolveEffectiveConfig
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-U6ACUNLU.js";
|
|
22
22
|
import {
|
|
23
23
|
GLOBAL_FLAGS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-52RZLSWP.js";
|
|
25
25
|
|
|
26
26
|
// src/commands/profile.ts
|
|
27
27
|
import { defineCommand } from "citty";
|
|
@@ -60,7 +60,10 @@ function resolveOutputOpts(flags) {
|
|
|
60
60
|
}
|
|
61
61
|
async function runProfileMe(client, flags, out) {
|
|
62
62
|
rejectPreviewOnRead(flags.preview, out);
|
|
63
|
-
|
|
63
|
+
const hasActivityFlag = !!(flags.posts || flags.comments || flags.reactions || flags.followers);
|
|
64
|
+
if (!hasActivityFlag) {
|
|
65
|
+
rejectAllOnNonPaginated(flags.all, out);
|
|
66
|
+
}
|
|
64
67
|
if (flags.sections === "") {
|
|
65
68
|
out.stderr.write("error: --sections must not be empty. Omit the flag or provide section names.\n");
|
|
66
69
|
process.exit(2);
|
|
@@ -68,19 +71,94 @@ async function runProfileMe(client, flags, out) {
|
|
|
68
71
|
}
|
|
69
72
|
const accountId = requireAccount(flags.account, out);
|
|
70
73
|
const ns = client.account(accountId);
|
|
74
|
+
const outOpts = resolveOutputOpts(flags);
|
|
75
|
+
if (hasActivityFlag) {
|
|
76
|
+
const all = flags.all ?? false;
|
|
77
|
+
const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
|
|
78
|
+
const params2 = {};
|
|
79
|
+
if (flags.limit) params2["limit"] = parseInt(flags.limit, 10);
|
|
80
|
+
if (flags.cursor) params2["cursor"] = flags.cursor;
|
|
81
|
+
try {
|
|
82
|
+
const meResult = await ns.profiles.getMe({});
|
|
83
|
+
const ownSlug = meResult["public_identifier"];
|
|
84
|
+
if (flags.posts) {
|
|
85
|
+
if (all) {
|
|
86
|
+
const fn = (p) => ns.profiles.listPosts(ownSlug, p);
|
|
87
|
+
for await (const item of streamAll(fn, params2, {
|
|
88
|
+
maxPages,
|
|
89
|
+
onTruncated: (msg) => out.stderr.write(msg + "\n")
|
|
90
|
+
})) {
|
|
91
|
+
out.stdout.write(JSON.stringify(item) + "\n");
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
const result = await ns.profiles.listPosts(ownSlug, params2);
|
|
95
|
+
renderSuccess(result, outOpts, out);
|
|
96
|
+
}
|
|
97
|
+
} else if (flags.comments) {
|
|
98
|
+
if (all) {
|
|
99
|
+
const fn = (p) => ns.profiles.listComments(ownSlug, p);
|
|
100
|
+
for await (const item of streamAll(fn, params2, {
|
|
101
|
+
maxPages,
|
|
102
|
+
onTruncated: (msg) => out.stderr.write(msg + "\n")
|
|
103
|
+
})) {
|
|
104
|
+
out.stdout.write(JSON.stringify(item) + "\n");
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
const result = await ns.profiles.listComments(ownSlug, params2);
|
|
108
|
+
renderSuccess(result, outOpts, out);
|
|
109
|
+
}
|
|
110
|
+
} else if (flags.reactions) {
|
|
111
|
+
if (all) {
|
|
112
|
+
const fn = (p) => ns.profiles.listReactions(ownSlug, p);
|
|
113
|
+
for await (const item of streamAll(fn, params2, {
|
|
114
|
+
maxPages,
|
|
115
|
+
onTruncated: (msg) => out.stderr.write(msg + "\n")
|
|
116
|
+
})) {
|
|
117
|
+
out.stdout.write(JSON.stringify(item) + "\n");
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
const result = await ns.profiles.listReactions(ownSlug, params2);
|
|
121
|
+
renderSuccess(result, outOpts, out);
|
|
122
|
+
}
|
|
123
|
+
} else if (flags.followers) {
|
|
124
|
+
if (all) {
|
|
125
|
+
const fn = (p) => ns.profiles.listFollowers(ownSlug, p);
|
|
126
|
+
for await (const item of streamAll(fn, params2, {
|
|
127
|
+
maxPages,
|
|
128
|
+
onTruncated: (msg) => out.stderr.write(msg + "\n")
|
|
129
|
+
})) {
|
|
130
|
+
out.stdout.write(JSON.stringify(item) + "\n");
|
|
131
|
+
}
|
|
132
|
+
} else {
|
|
133
|
+
const result = await ns.profiles.listFollowers(ownSlug, params2);
|
|
134
|
+
renderSuccess(result, outOpts, out);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
} catch (err) {
|
|
138
|
+
const { CurviateError } = await import("@curviate/sdk");
|
|
139
|
+
if (err instanceof CurviateError) {
|
|
140
|
+
const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
|
|
141
|
+
renderError(err, outOpts, out);
|
|
142
|
+
process.exit(getExitCode(err.code));
|
|
143
|
+
}
|
|
144
|
+
renderUnexpectedError(err, out);
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
71
149
|
const params = {};
|
|
72
150
|
if (flags.sections) {
|
|
73
151
|
params["linkedin_sections"] = flags.sections.split(",").map((s) => s.trim()).filter(Boolean);
|
|
74
152
|
}
|
|
75
153
|
try {
|
|
76
154
|
const result = await ns.profiles.getMe(params);
|
|
77
|
-
const
|
|
78
|
-
renderSuccess(result,
|
|
155
|
+
const slimOutOpts = { ...outOpts, slim: slimProfileMe };
|
|
156
|
+
renderSuccess(result, slimOutOpts, out);
|
|
79
157
|
} catch (err) {
|
|
80
158
|
const { CurviateError } = await import("@curviate/sdk");
|
|
81
159
|
if (err instanceof CurviateError) {
|
|
82
160
|
const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
|
|
83
|
-
renderError(err,
|
|
161
|
+
renderError(err, outOpts, out);
|
|
84
162
|
process.exit(getExitCode(err.code));
|
|
85
163
|
}
|
|
86
164
|
renderUnexpectedError(err, out);
|
|
@@ -268,12 +346,32 @@ async function runProfileEndorse(client, flags, out) {
|
|
|
268
346
|
}
|
|
269
347
|
}
|
|
270
348
|
var profileMeCommand = defineCommand({
|
|
271
|
-
meta: { name: "me", description: "Get your own
|
|
349
|
+
meta: { name: "me", description: "Get your own profile, or list own activity with --posts/--comments/--reactions/--followers." },
|
|
272
350
|
args: {
|
|
273
351
|
...GLOBAL_FLAGS,
|
|
274
352
|
sections: {
|
|
275
353
|
type: "string",
|
|
276
|
-
description: "Comma-separated LinkedIn sections to fetch (e.g. experience,education)."
|
|
354
|
+
description: "Comma-separated LinkedIn sections to fetch (e.g. experience,education). Only applies to the base getMe call (no activity flag)."
|
|
355
|
+
},
|
|
356
|
+
posts: {
|
|
357
|
+
type: "boolean",
|
|
358
|
+
description: "List own activity feed (posts + reposts). For authored-only posts, use 'post list'.",
|
|
359
|
+
default: false
|
|
360
|
+
},
|
|
361
|
+
comments: {
|
|
362
|
+
type: "boolean",
|
|
363
|
+
description: "List own comments.",
|
|
364
|
+
default: false
|
|
365
|
+
},
|
|
366
|
+
reactions: {
|
|
367
|
+
type: "boolean",
|
|
368
|
+
description: "List own reactions.",
|
|
369
|
+
default: false
|
|
370
|
+
},
|
|
371
|
+
followers: {
|
|
372
|
+
type: "boolean",
|
|
373
|
+
description: "List own followers.",
|
|
374
|
+
default: false
|
|
277
375
|
}
|
|
278
376
|
},
|
|
279
377
|
async run({ args }) {
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
renderSuccess,
|
|
28
28
|
renderUnexpectedError,
|
|
29
29
|
resolveEffectiveConfig
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-U6ACUNLU.js";
|
|
31
31
|
import {
|
|
32
32
|
GLOBAL_FLAGS
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-52RZLSWP.js";
|
|
34
34
|
|
|
35
35
|
// src/commands/recruiter.ts
|
|
36
36
|
import { defineCommand } from "citty";
|
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
renderSuccess,
|
|
25
25
|
renderUnexpectedError,
|
|
26
26
|
resolveEffectiveConfig
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-U6ACUNLU.js";
|
|
28
28
|
import {
|
|
29
29
|
GLOBAL_FLAGS
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-52RZLSWP.js";
|
|
31
31
|
|
|
32
32
|
// src/commands/sales-nav.ts
|
|
33
33
|
import { defineCommand } from "citty";
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
renderSuccess,
|
|
15
15
|
renderUnexpectedError,
|
|
16
16
|
resolveEffectiveConfig
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U6ACUNLU.js";
|
|
18
18
|
import {
|
|
19
19
|
GLOBAL_FLAGS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-52RZLSWP.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/search.ts
|
|
23
23
|
import { defineCommand } from "citty";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
renderSuccess,
|
|
12
12
|
renderUnexpectedError,
|
|
13
13
|
resolveEffectiveConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U6ACUNLU.js";
|
|
15
15
|
import {
|
|
16
16
|
GLOBAL_FLAGS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-52RZLSWP.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/webhook.ts
|
|
20
20
|
import { defineCommand } from "citty";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curviate/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Official command-line interface for the Curviate API.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"homepage": "https://docs.curviate.com",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/curviate/cli.git"
|
|
11
|
+
"url": "git+https://github.com/curviate/cli.git"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/curviate/cli/issues"
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@curviate/sdk": "^0.2.
|
|
43
|
+
"@curviate/sdk": "^0.2.1",
|
|
44
44
|
"citty": "^0.1.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^22.15.21",
|
|
48
48
|
"eslint": "^9.0.0",
|
|
49
|
-
"typescript-eslint": "^8.0.0",
|
|
50
49
|
"tsup": "^8.3.5",
|
|
51
50
|
"typescript": "^5.7.2",
|
|
51
|
+
"typescript-eslint": "^8.0.0",
|
|
52
52
|
"vitest": "^3.2.2"
|
|
53
53
|
}
|
|
54
54
|
}
|