@curviate/cli 0.50.0-next.5 → 0.50.0-next.7
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 +12 -0
- package/README.md +38 -7
- package/dist/{account-WF27VTZF.js → account-IHEU7HP6.js} +9 -9
- package/dist/{analytics-Z7AE5JEI.js → analytics-WBZN4LT4.js} +5 -5
- package/dist/{beta-consent-VETVR6KP.js → beta-consent-ZQFZWXZG.js} +4 -4
- package/dist/{billing-TYXPR6ZC.js → billing-A3IGRVJH.js} +5 -5
- package/dist/{chunk-RLZP2PL4.js → chunk-3U6WEWE5.js} +11 -11
- package/dist/{chunk-HOS3JH4L.js → chunk-4J4WTYUY.js} +2 -2
- package/dist/{chunk-X62K5XDP.js → chunk-5FPD6PTC.js} +6 -6
- package/dist/{chunk-GGJTO3PN.js → chunk-6UXXVJYQ.js} +2 -2
- package/dist/{chunk-I3HD5UFH.js → chunk-BRUQT2ED.js} +1 -1
- package/dist/{chunk-QLBNUWM2.js → chunk-EUNZGSPN.js} +57 -23
- package/dist/{chunk-73DJ3KNE.js → chunk-FBBZVIFJ.js} +2 -1
- package/dist/{chunk-2W4RN5ON.js → chunk-QW5K5DTC.js} +2 -0
- package/dist/{chunk-5YQXZIFH.js → chunk-RP3BBLHW.js} +2 -2
- package/dist/{chunk-UFHZGBFD.js → chunk-S26VKVWW.js} +1 -1
- package/dist/{chunk-EHTSCHKM.js → chunk-S3RXK4OU.js} +1 -1
- package/dist/{chunk-5I6JJJIV.js → chunk-VHNF6OZD.js} +8 -3
- package/dist/cli.js +25 -25
- package/dist/{comment-YAQSZNYS.js → comment-MSKOUIHT.js} +13 -13
- package/dist/{company-4K75VGBM.js → company-IXDGDEOU.js} +12 -12
- package/dist/{config-OESEJHKZ.js → config-3CLMU2WU.js} +2 -2
- package/dist/{connect-LZJQOYX2.js → connect-TNFZPMPA.js} +11 -11
- package/dist/{contact-XE7HK4RI.js → contact-XTZQH4KW.js} +8 -8
- package/dist/{contact-groups-IHF7GMNG.js → contact-groups-FB4IXRJM.js} +10 -10
- package/dist/{contact-import-SSPUBHAH.js → contact-import-RHXS2XLJ.js} +9 -9
- package/dist/core-JFFNJM7I.js +46 -0
- package/dist/{do-not-contact-LOUCA7JT.js → do-not-contact-25EKOEY3.js} +5 -5
- package/dist/{doctor-Q3434Q7N.js → doctor-GPEBBS5E.js} +4 -4
- package/dist/{draft-SOO3UJIO.js → draft-B3HNK3YS.js} +9 -9
- package/dist/{enrollment-YQMSDXVJ.js → enrollment-HCI4ROPD.js} +6 -6
- package/dist/{examples-74FXGJ7X.js → examples-ICAGL2S5.js} +1 -1
- package/dist/{exit-codes-7DBETBDT.js → exit-codes-CYQHN4NE.js} +1 -1
- package/dist/{export-F6ZFNZ7L.js → export-MRUBK3QC.js} +4 -4
- package/dist/{feed-YE4HOQ2M.js → feed-YQVZQBJ5.js} +6 -6
- package/dist/{group-OCKSOR65.js → group-YOZG2E4Z.js} +6 -6
- package/dist/{inbox-VGCODDRH.js → inbox-3RTYBVRQ.js} +7 -7
- package/dist/{inboxes-XHP6F3MQ.js → inboxes-7ILPNCVY.js} +6 -6
- package/dist/{incoming-AA3MTRAG.js → incoming-PG3KAYZT.js} +5 -5
- package/dist/{job-KFZNTBXT.js → job-FBNPGF3M.js} +6 -6
- package/dist/{login-BD7JQXGX.js → login-GBTMG7NK.js} +2 -2
- package/dist/{message-IXUDKHBW.js → message-FWA4UJIH.js} +7 -7
- package/dist/{motion-QSANYJKR.js → motion-QNO6OYYE.js} +90 -7
- package/dist/{network-A5M6SLRI.js → network-LPPIA6VZ.js} +5 -5
- package/dist/{notification-XRCV5XNX.js → notification-YGIYY2R2.js} +6 -6
- package/dist/{notifications-SU7NKFGF.js → notifications-GRIVVCE7.js} +6 -6
- package/dist/{post-YWXQ2MVL.js → post-SQDYP3NR.js} +12 -12
- package/dist/{profile-JVNJAAZ7.js → profile-4TJZDVF2.js} +16 -16
- package/dist/{recruiter-34G433BX.js → recruiter-NPW3MDYD.js} +11 -11
- package/dist/{sales-nav-34WK5HF6.js → sales-nav-GKXW2GQ2.js} +11 -11
- package/dist/{search-43YUBUEH.js → search-NZ6J5B5M.js} +14 -14
- package/dist/{setup-RFSXQVN6.js → setup-ODOOKKGJ.js} +4 -4
- package/dist/{team-WSRM74PS.js → team-C2MN3DDT.js} +5 -5
- package/dist/{tier-JQYS4MMF.js → tier-HMPVO6GL.js} +4 -4
- package/dist/{unibox-LFTLITLA.js → unibox-NIYPXKZU.js} +5 -5
- package/dist/{webhook-HX2NOPNE.js → webhook-ZQR37JJV.js} +5 -5
- package/package.json +2 -2
- package/dist/core-524AMFTQ.js +0 -46
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
AttachError,
|
|
4
|
-
readAttachment,
|
|
5
|
-
toAttachmentPayload
|
|
6
|
-
} from "./chunk-5I6JJJIV.js";
|
|
7
2
|
import {
|
|
8
3
|
BinaryOutputError,
|
|
9
4
|
writeBinaryOutput
|
|
@@ -18,16 +13,22 @@ import {
|
|
|
18
13
|
resolveIdentifier,
|
|
19
14
|
resolveJobIdentifier
|
|
20
15
|
} from "./chunk-UEAX6KUB.js";
|
|
16
|
+
import {
|
|
17
|
+
AttachError,
|
|
18
|
+
isAudioFile,
|
|
19
|
+
readAttachment,
|
|
20
|
+
toAttachmentPayload
|
|
21
|
+
} from "./chunk-VHNF6OZD.js";
|
|
21
22
|
import {
|
|
22
23
|
requireAccount
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4J4WTYUY.js";
|
|
24
25
|
import {
|
|
25
26
|
buildPreviewOutput
|
|
26
27
|
} from "./chunk-TCUYH5GO.js";
|
|
27
28
|
import {
|
|
28
29
|
readableId,
|
|
29
30
|
readableObject
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-S26VKVWW.js";
|
|
31
32
|
import {
|
|
32
33
|
renderError,
|
|
33
34
|
renderSuccess,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
createClient,
|
|
38
39
|
downloadBinary,
|
|
39
40
|
resolveEffectiveConfig
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-BRUQT2ED.js";
|
|
41
42
|
import {
|
|
42
43
|
READ_SINGLE_FLAGS,
|
|
43
44
|
WRITE_FLAGS,
|
|
@@ -45,7 +46,7 @@ import {
|
|
|
45
46
|
} from "./chunk-RYWWSZUH.js";
|
|
46
47
|
import {
|
|
47
48
|
DESCRIPTIONS
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-FBBZVIFJ.js";
|
|
49
50
|
import {
|
|
50
51
|
looksLikeCommandWord,
|
|
51
52
|
nearestSubcommand
|
|
@@ -130,6 +131,20 @@ function readSharedContent(flags, text, attachPaths, out) {
|
|
|
130
131
|
if (attachPaths.length > 0) refuse(`${flag} cannot be combined with --attach.`);
|
|
131
132
|
return post !== void 0 ? { type: "post", id: raw } : { type: "job_posting", id: resolveJobIdentifier(raw) };
|
|
132
133
|
}
|
|
134
|
+
function readVoiceNote(flags, text, attachPaths, out) {
|
|
135
|
+
const refuse = (msg) => {
|
|
136
|
+
out.stderr.write(`error: ${msg}
|
|
137
|
+
`);
|
|
138
|
+
process.exit(2);
|
|
139
|
+
};
|
|
140
|
+
const asFile = flags["as-file"] === true;
|
|
141
|
+
if (text.trim() === "" && attachPaths.length === 0) refuse("nothing to send: pass the message text, or --attach a file.");
|
|
142
|
+
if (asFile && attachPaths.length === 0) refuse("--as-file needs --attach: it sends the attached files as downloads.");
|
|
143
|
+
if (asFile || !attachPaths.some(isAudioFile)) return { voiceNote: false, sendMode: asFile ? "file" : void 0 };
|
|
144
|
+
if (attachPaths.length > 1) refuse("a voice note is one audio file alone: pass a single --attach, or add --as-file to send the files as downloads.");
|
|
145
|
+
if (text.trim() !== "") refuse("a voice note carries no text: drop the text, or add --as-file to send the audio as a download with it.");
|
|
146
|
+
return { voiceNote: true, sendMode: void 0 };
|
|
147
|
+
}
|
|
133
148
|
function normalizeToValues(to) {
|
|
134
149
|
return (Array.isArray(to) ? to : to === void 0 ? [] : [to]).filter((v) => v !== "");
|
|
135
150
|
}
|
|
@@ -138,7 +153,7 @@ var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
|
|
|
138
153
|
async function handleSdkError(err, outOpts, out) {
|
|
139
154
|
const { CurviateError } = await import("@curviate/sdk");
|
|
140
155
|
if (err instanceof CurviateError) {
|
|
141
|
-
const { getExitCode } = await import("./exit-codes-
|
|
156
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
142
157
|
renderError(err, outOpts, out);
|
|
143
158
|
process.exit(getExitCode(err));
|
|
144
159
|
}
|
|
@@ -176,6 +191,7 @@ async function runMessageNew(client, flags, out, _readStdin) {
|
|
|
176
191
|
const outOpts = resolveOutputOpts(flags);
|
|
177
192
|
const text = await resolveTextOrStdin(rawText, out, _readStdin);
|
|
178
193
|
const sharedContent = readSharedContent(flags, text, attachPaths, out);
|
|
194
|
+
const { voiceNote, sendMode } = readVoiceNote(flags, text, attachPaths, out);
|
|
179
195
|
const attendeeIds = [];
|
|
180
196
|
for (const rawTo of rawTos) {
|
|
181
197
|
const resolvedSlugOrId = resolveIdentifier(rawTo);
|
|
@@ -192,15 +208,17 @@ async function runMessageNew(client, flags, out, _readStdin) {
|
|
|
192
208
|
}
|
|
193
209
|
if (providerId !== void 0 && !attendeeIds.includes(providerId)) attendeeIds.push(providerId);
|
|
194
210
|
}
|
|
195
|
-
const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf));
|
|
211
|
+
const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf, sendMode));
|
|
196
212
|
if (flags.preview) {
|
|
197
213
|
const preview = buildPreviewOutput({
|
|
198
214
|
method: "messaging.startChat",
|
|
199
215
|
args: { attendees_ids: attendeeIds },
|
|
200
216
|
body: {
|
|
201
217
|
attendees_ids: attendeeIds,
|
|
202
|
-
text,
|
|
218
|
+
...voiceNote ? {} : { text },
|
|
203
219
|
...subject !== void 0 ? { subject } : {},
|
|
220
|
+
...voiceNote ? { voice_note: true } : {},
|
|
221
|
+
...sendMode ? { send_mode: sendMode } : {},
|
|
204
222
|
...sharedContent ? { shared_content: sharedContent } : {}
|
|
205
223
|
},
|
|
206
224
|
account: accountId,
|
|
@@ -214,7 +232,8 @@ async function runMessageNew(client, flags, out, _readStdin) {
|
|
|
214
232
|
}
|
|
215
233
|
const body = {
|
|
216
234
|
attendees_ids: attendeeIds,
|
|
217
|
-
text,
|
|
235
|
+
// A voice note carries no text: the key is left out, never sent empty.
|
|
236
|
+
...voiceNote ? {} : { text },
|
|
218
237
|
// Present only when the flag was given: an absent subject must leave the
|
|
219
238
|
// key out, never send `subject: ""` (the server has no `.min(1)`).
|
|
220
239
|
...subject !== void 0 ? { subject } : {},
|
|
@@ -235,6 +254,7 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
235
254
|
const attachPaths = normalizeAttachPaths(flags.attach);
|
|
236
255
|
const text = await resolveTextOrStdin(rawText, out, _readStdin);
|
|
237
256
|
const sharedContent = readSharedContent(flags, text, attachPaths, out);
|
|
257
|
+
const { voiceNote, sendMode } = readVoiceNote(flags, text, attachPaths, out);
|
|
238
258
|
let attachBuffers = [];
|
|
239
259
|
try {
|
|
240
260
|
attachBuffers = await Promise.all(attachPaths.map((p) => readAttachment(p)));
|
|
@@ -250,7 +270,12 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
250
270
|
const preview = buildPreviewOutput({
|
|
251
271
|
method: "messaging.sendMessage",
|
|
252
272
|
args: { chat_id: chatId },
|
|
253
|
-
body: {
|
|
273
|
+
body: {
|
|
274
|
+
...voiceNote ? {} : { text },
|
|
275
|
+
...sharedContent ? { shared_content: sharedContent } : {},
|
|
276
|
+
...voiceNote ? { voice_note: true } : {},
|
|
277
|
+
...sendMode ? { send_mode: sendMode } : {}
|
|
278
|
+
},
|
|
254
279
|
account: accountId,
|
|
255
280
|
attachments: attachBuffers.map((buf, i) => ({
|
|
256
281
|
name: attachPaths[i] ? attachPaths[i].split("/").pop() ?? attachPaths[i] : `attachment_${i}`,
|
|
@@ -262,9 +287,9 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
262
287
|
if (willSendAs) out.stderr.write(willSendAs);
|
|
263
288
|
return;
|
|
264
289
|
}
|
|
265
|
-
const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf));
|
|
290
|
+
const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf, sendMode));
|
|
266
291
|
const body = {
|
|
267
|
-
text,
|
|
292
|
+
...voiceNote ? {} : { text },
|
|
268
293
|
...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {},
|
|
269
294
|
...sharedContent ? { shared_content: sharedContent } : {}
|
|
270
295
|
};
|
|
@@ -458,6 +483,11 @@ async function runMessageInMailBalance(client, flags, out) {
|
|
|
458
483
|
await handleSdkError(err, outOpts, out);
|
|
459
484
|
}
|
|
460
485
|
}
|
|
486
|
+
var ATTACH_DESC = "File to attach (repeatable). Not with --share-post or --share-job. One audio file (MP3, WAV, M4A, WebM, Ogg) alone, with no text, to one person, arrives as a voice note: no duration limit is stated here, and a size the platform refuses is PAYLOAD_TOO_LARGE. Audio to a group, in InMail or to a company page stays a file. --as-file keeps audio a file.";
|
|
487
|
+
var AS_FILE = {
|
|
488
|
+
type: "boolean",
|
|
489
|
+
description: "Send every --attach as a file download, audio included (send_mode file). Then the audio may carry text, and several files may go together."
|
|
490
|
+
};
|
|
461
491
|
var SHARE_ARGS = {
|
|
462
492
|
"share-post": {
|
|
463
493
|
type: "string",
|
|
@@ -484,7 +514,7 @@ var messageNewCommand = defineCommand({
|
|
|
484
514
|
examples: [
|
|
485
515
|
'curviate core message new --to janesmith "Hi Jane, enjoyed your post on agent evals."',
|
|
486
516
|
'curviate core message new --to janesmith --to ACoAAAexample --subject "Q4 intro" "Hi both, meet each other." --preview',
|
|
487
|
-
|
|
517
|
+
"curviate core message new --to janesmith --attach hello.m4a"
|
|
488
518
|
]
|
|
489
519
|
},
|
|
490
520
|
args: {
|
|
@@ -495,12 +525,13 @@ var messageNewCommand = defineCommand({
|
|
|
495
525
|
description: "Recipient (repeatable): LinkedIn profile URL (e.g. https://www.linkedin.com/in/some-slug), bare slug (e.g. some-slug), or provider ID (e.g. ACoAAA...). URL and slug inputs resolve the provider ID automatically. One --to starts a direct chat; two or more different people start a group chat. A person named twice counts once.",
|
|
496
526
|
required: true
|
|
497
527
|
},
|
|
498
|
-
text: { type: "positional", stdinArg: true, description: "Opening message text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
|
|
528
|
+
text: { type: "positional", stdinArg: true, required: false, description: "Opening message text. Pass - to read from stdin (e.g. via heredoc or pipe). Omit it only for a voice note: one --attach audio file alone." },
|
|
499
529
|
subject: {
|
|
500
530
|
type: "string",
|
|
501
531
|
description: "Optional conversation name / subject line (at most 200 characters). The group's name when there are two or more people. Omit it for an unnamed chat; an empty value is a usage error."
|
|
502
532
|
},
|
|
503
|
-
attach: { type: "string", description:
|
|
533
|
+
attach: { type: "string", description: ATTACH_DESC },
|
|
534
|
+
"as-file": AS_FILE,
|
|
504
535
|
...SHARE_ARGS
|
|
505
536
|
},
|
|
506
537
|
async run({ args }) {
|
|
@@ -790,7 +821,8 @@ var messageSendCommand = defineCommand({
|
|
|
790
821
|
errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET, RECIPIENT_UNREACHABLE: "LinkedIn will not let the Account message this person.", CHAT_NOT_VISIBLE: "the chat is not visible to the Account." },
|
|
791
822
|
examples: [
|
|
792
823
|
'curviate core message send 2-YTQ3ODU3Njgt "Thanks, that makes sense."',
|
|
793
|
-
'curviate core message send 2-YTQ3ODU3Njgt --share-post 7380123456789012345 "This is the post I meant." --preview'
|
|
824
|
+
'curviate core message send 2-YTQ3ODU3Njgt --share-post 7380123456789012345 "This is the post I meant." --preview',
|
|
825
|
+
"curviate core message send 2-YTQ3ODU3Njgt --attach hello.m4a"
|
|
794
826
|
]
|
|
795
827
|
},
|
|
796
828
|
args: {
|
|
@@ -800,8 +832,9 @@ var messageSendCommand = defineCommand({
|
|
|
800
832
|
type: "positional",
|
|
801
833
|
description: "Chat ID or LinkedIn messaging thread URL. A COMPANY_ chat id sends as the company page; any other chat id sends as the connected member."
|
|
802
834
|
},
|
|
803
|
-
text: { type: "positional", stdinArg: true, description: "Message text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
|
|
804
|
-
attach: { type: "string", description:
|
|
835
|
+
text: { type: "positional", stdinArg: true, required: false, description: "Message text. Pass - to read from stdin (e.g. via heredoc or pipe). Omit it only for a voice note: one --attach audio file alone." },
|
|
836
|
+
attach: { type: "string", description: ATTACH_DESC },
|
|
837
|
+
"as-file": AS_FILE,
|
|
805
838
|
...SHARE_ARGS
|
|
806
839
|
},
|
|
807
840
|
async run({ args }) {
|
|
@@ -912,7 +945,8 @@ var messageCommand = defineCommand({
|
|
|
912
945
|
required: false
|
|
913
946
|
},
|
|
914
947
|
text: { type: "positional", stdinArg: true, description: "Message text. Pass - to read from stdin.", required: false },
|
|
915
|
-
attach: { type: "string", description:
|
|
948
|
+
attach: { type: "string", description: ATTACH_DESC },
|
|
949
|
+
"as-file": AS_FILE,
|
|
916
950
|
...SHARE_ARGS
|
|
917
951
|
},
|
|
918
952
|
subCommands: {
|
|
@@ -7,7 +7,8 @@ var DESCRIPTIONS = {
|
|
|
7
7
|
login: "Save an API key to a local profile. Run `curviate core profile me` to verify.",
|
|
8
8
|
config: "Manage CLI profiles and settings.",
|
|
9
9
|
account: "LinkedIn account connection management.",
|
|
10
|
-
motion: "Motions: one Sequence run for the Contacts of your Team's Contact lists, from its sending Accounts, paced on a schedule. Create and edit drafts, preview, start, pause, resume, archive, add or remove Contacts; lint a Sequence and write a template offline. Your Team's data: every role reads; writes need motion-send on each sending Account, and Motions need the Automate plan.",
|
|
10
|
+
motion: "Motions: one Sequence run for the Contacts of your Team's Contact lists, from its sending Accounts, paced on a schedule. Create and edit drafts, preview, start, pause, resume, archive, add or remove Contacts; lint a Sequence and write a template offline; upload the audio of a voice note step (`curviate motion voice-clip`). Your Team's data: every role reads; writes need motion-send on each sending Account, and Motions need the Automate plan.",
|
|
11
|
+
motionVoiceClip: "Voice clips: the audio a `voice.send` step plays. Upload one audio file (1 to 120 seconds, up to 20 MiB), then put its id in a Sequence as `clip_id`; read one back. Nothing reaches LinkedIn until a Motion that uses it is started. Uploads need the Automate plan.",
|
|
11
12
|
enrollment: "Enrollments: one Contact in one Motion on one Account. List and read them; pause, resume, retry a failed Step, stop, send a custom event, reassign, or act on many at once. Your Team's data: every role reads; writes need operate on the Enrollment's Account.",
|
|
12
13
|
contact: "Contacts: the people in your Team's lists, not LinkedIn actions. List, read, add, change and delete them; import and export; enrich from LinkedIn profiles. Subgroups: `curviate contact lists` (Contact lists, including combining lists), `curviate contact tags`, `curviate contact imports`. Your Team's data: every role reads and writes; deleting is for Owners and Managers.",
|
|
13
14
|
"do-not-contact": "Do-not-contact: your Team's one list of people no Motion contacts and no write reaches (a write toward them exits 10). List, read, add, change the reason, remove. Any member adds; removing is for Owners and Managers.",
|
|
@@ -213,6 +213,8 @@ var EXIT_CODE_MAP = {
|
|
|
213
213
|
CONTACT_NOT_ENROLLABLE: 2,
|
|
214
214
|
CHAT_NOT_ONE_TO_ONE: 2,
|
|
215
215
|
STEP_IN_FLIGHT: 7,
|
|
216
|
+
// Voice clips: the file is empty, not audio, undecodable or outside 1 to 120 seconds; it never succeeds as sent.
|
|
217
|
+
VOICE_CLIP_INVALID: 2,
|
|
216
218
|
// Client-side: no response within --timeout. Transient, as a refused connection is.
|
|
217
219
|
CLIENT_TIMEOUT: 7
|
|
218
220
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
fail,
|
|
4
4
|
outputOpts
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6UXXVJYQ.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/chunks.ts
|
|
8
8
|
async function sendInChunks(ids, size, send, f) {
|
|
@@ -32,7 +32,7 @@ async function sendChunked(chunks, send, f, unit) {
|
|
|
32
32
|
`);
|
|
33
33
|
return fail(err, f);
|
|
34
34
|
}
|
|
35
|
-
const { getExitCode } = await import("./exit-codes-
|
|
35
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
36
36
|
const e = err.toJSON();
|
|
37
37
|
if (outputOpts(f).json) process.stdout.write(JSON.stringify({ error: e, progress }) + "\n");
|
|
38
38
|
process.stderr.write(
|
|
@@ -43,18 +43,23 @@ var MIME_BY_EXT = {
|
|
|
43
43
|
function guessContentType(filePath) {
|
|
44
44
|
return MIME_BY_EXT[extname(filePath).toLowerCase()] ?? "application/octet-stream";
|
|
45
45
|
}
|
|
46
|
-
function toAttachmentPayload(filePath, buf) {
|
|
46
|
+
function toAttachmentPayload(filePath, buf, sendMode) {
|
|
47
47
|
return {
|
|
48
48
|
content: buf.toString("base64"),
|
|
49
49
|
content_type: guessContentType(filePath),
|
|
50
|
-
filename: basename(filePath)
|
|
50
|
+
filename: basename(filePath),
|
|
51
|
+
...sendMode ? { send_mode: sendMode } : {}
|
|
51
52
|
};
|
|
52
53
|
}
|
|
54
|
+
function isAudioFile(filePath) {
|
|
55
|
+
return guessContentType(filePath).startsWith("audio/");
|
|
56
|
+
}
|
|
53
57
|
|
|
54
58
|
export {
|
|
55
59
|
AttachError,
|
|
56
60
|
readAttachment,
|
|
57
61
|
describeAttachment,
|
|
58
62
|
guessContentType,
|
|
59
|
-
toAttachmentPayload
|
|
63
|
+
toAttachmentPayload,
|
|
64
|
+
isAudioFile
|
|
60
65
|
};
|
package/dist/cli.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-RYWWSZUH.js";
|
|
16
16
|
import {
|
|
17
17
|
lazy
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FBBZVIFJ.js";
|
|
19
19
|
import {
|
|
20
20
|
editDistance
|
|
21
21
|
} from "./chunk-FDJMAF7D.js";
|
|
@@ -45,33 +45,33 @@ var main = defineCommand({
|
|
|
45
45
|
// Subcommand registry, names and descriptions are static for help rendering;
|
|
46
46
|
// the handler implementation is loaded lazily on first invocation.
|
|
47
47
|
subCommands: {
|
|
48
|
-
setup: lazy("setup", () => import("./setup-
|
|
49
|
-
doctor: lazy("doctor", () => import("./doctor-
|
|
50
|
-
login: lazy("login", () => import("./login-
|
|
51
|
-
config: lazy("config", () => import("./config-
|
|
52
|
-
account: lazy("account", () => import("./account-
|
|
53
|
-
motion: lazy("motion", () => import("./motion-
|
|
54
|
-
enrollment: lazy("enrollment", () => import("./enrollment-
|
|
55
|
-
contact: lazy("contact", () => import("./contact-
|
|
56
|
-
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-
|
|
57
|
-
unibox: lazy("unibox", () => import("./unibox-
|
|
58
|
-
network: lazy("network", () => import("./network-
|
|
59
|
-
analytics: lazy("analytics", () => import("./analytics-
|
|
60
|
-
notification: lazy("notification", () => import("./notifications-
|
|
61
|
-
export: lazy("export", () => import("./export-
|
|
62
|
-
billing: lazy("billing", () => import("./billing-
|
|
63
|
-
tier: lazy("tier", () => import("./tier-
|
|
64
|
-
team: lazy("team", () => import("./team-
|
|
65
|
-
incoming: lazy("incoming", () => import("./incoming-
|
|
66
|
-
beta: lazy("beta", () => import("./beta-consent-
|
|
67
|
-
webhook: lazy("webhook", () => import("./webhook-
|
|
48
|
+
setup: lazy("setup", () => import("./setup-ODOOKKGJ.js").then((m) => m.setupCommand)),
|
|
49
|
+
doctor: lazy("doctor", () => import("./doctor-GPEBBS5E.js").then((m) => m.doctorCommand)),
|
|
50
|
+
login: lazy("login", () => import("./login-GBTMG7NK.js").then((m) => m.loginCommand)),
|
|
51
|
+
config: lazy("config", () => import("./config-3CLMU2WU.js").then((m) => m.configCommand)),
|
|
52
|
+
account: lazy("account", () => import("./account-IHEU7HP6.js").then((m) => m.accountCommand)),
|
|
53
|
+
motion: lazy("motion", () => import("./motion-QNO6OYYE.js").then((m) => m.motionCommand)),
|
|
54
|
+
enrollment: lazy("enrollment", () => import("./enrollment-HCI4ROPD.js").then((m) => m.enrollmentCommand)),
|
|
55
|
+
contact: lazy("contact", () => import("./contact-XTZQH4KW.js").then((m) => m.contactCommand)),
|
|
56
|
+
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-25EKOEY3.js").then((m) => m.doNotContactCommand)),
|
|
57
|
+
unibox: lazy("unibox", () => import("./unibox-NIYPXKZU.js").then((m) => m.uniboxCommand)),
|
|
58
|
+
network: lazy("network", () => import("./network-LPPIA6VZ.js").then((m) => m.networkCommand)),
|
|
59
|
+
analytics: lazy("analytics", () => import("./analytics-WBZN4LT4.js").then((m) => m.analyticsCommand)),
|
|
60
|
+
notification: lazy("notification", () => import("./notifications-GRIVVCE7.js").then((m) => m.notificationsCommand)),
|
|
61
|
+
export: lazy("export", () => import("./export-MRUBK3QC.js").then((m) => m.exportCommand)),
|
|
62
|
+
billing: lazy("billing", () => import("./billing-A3IGRVJH.js").then((m) => m.billingCommand)),
|
|
63
|
+
tier: lazy("tier", () => import("./tier-HMPVO6GL.js").then((m) => m.tierCommand)),
|
|
64
|
+
team: lazy("team", () => import("./team-C2MN3DDT.js").then((m) => m.teamCommand)),
|
|
65
|
+
incoming: lazy("incoming", () => import("./incoming-PG3KAYZT.js").then((m) => m.incomingCommand)),
|
|
66
|
+
beta: lazy("beta", () => import("./beta-consent-ZQFZWXZG.js").then((m) => m.betaCommand)),
|
|
67
|
+
webhook: lazy("webhook", () => import("./webhook-ZQR37JJV.js").then((m) => m.webhookCommand)),
|
|
68
68
|
// The LinkedIn building blocks. Reserved product groups
|
|
69
69
|
// (unibox, network, analytics, team) land
|
|
70
70
|
// between `enrollment` and `webhook` with their owning specs.
|
|
71
|
-
core: lazy("core", () => import("./core-
|
|
71
|
+
core: lazy("core", () => import("./core-JFFNJM7I.js").then((m) => m.coreCommand))
|
|
72
72
|
},
|
|
73
73
|
async run() {
|
|
74
|
-
const { showHelp } = await import("./examples-
|
|
74
|
+
const { showHelp } = await import("./examples-ICAGL2S5.js");
|
|
75
75
|
await showHelp(main, ["curviate"]);
|
|
76
76
|
}
|
|
77
77
|
});
|
|
@@ -363,7 +363,7 @@ async function dispatch(root, rawArgs) {
|
|
|
363
363
|
helpFor = "curviate";
|
|
364
364
|
if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
|
|
365
365
|
const { leaf, path } = await resolveLeaf(root, rawArgs.filter((a) => a !== "--help" && a !== "-h"));
|
|
366
|
-
const { showHelp } = await import("./examples-
|
|
366
|
+
const { showHelp } = await import("./examples-ICAGL2S5.js");
|
|
367
367
|
await showHelp(leaf, path);
|
|
368
368
|
await new Promise((done) => process.stdout.write("", () => done()));
|
|
369
369
|
process.exit(0);
|
|
@@ -445,7 +445,7 @@ async function dispatch(root, rawArgs) {
|
|
|
445
445
|
if (code === "EARG") process.stderr.write(helpPointer());
|
|
446
446
|
const { CurviateError } = await import("@curviate/sdk");
|
|
447
447
|
if (err instanceof CurviateError) {
|
|
448
|
-
const { getExitCode } = await import("./exit-codes-
|
|
448
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
449
449
|
process.exit(getExitCode(err));
|
|
450
450
|
}
|
|
451
451
|
process.exit(code === "EARG" ? 2 : 1);
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
AttachError,
|
|
7
|
-
describeAttachment,
|
|
8
|
-
readAttachment,
|
|
9
|
-
toAttachmentPayload
|
|
10
|
-
} from "./chunk-5I6JJJIV.js";
|
|
4
|
+
} from "./chunk-S3RXK4OU.js";
|
|
11
5
|
import {
|
|
12
6
|
AS_ACCOUNT,
|
|
13
7
|
BUDGET,
|
|
14
8
|
TARGET
|
|
15
9
|
} from "./chunk-Q3ZPRFUX.js";
|
|
16
10
|
import "./chunk-UEAX6KUB.js";
|
|
11
|
+
import {
|
|
12
|
+
AttachError,
|
|
13
|
+
describeAttachment,
|
|
14
|
+
readAttachment,
|
|
15
|
+
toAttachmentPayload
|
|
16
|
+
} from "./chunk-VHNF6OZD.js";
|
|
17
17
|
import {
|
|
18
18
|
requireAccount
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4J4WTYUY.js";
|
|
20
20
|
import {
|
|
21
21
|
buildPreviewOutput
|
|
22
22
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
readablePage,
|
|
28
28
|
rejectPaginationModifiersWithoutAll,
|
|
29
29
|
streamAll
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-S26VKVWW.js";
|
|
31
31
|
import {
|
|
32
32
|
renderError,
|
|
33
33
|
renderSuccess,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
createClient,
|
|
39
39
|
resolveEffectiveConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-BRUQT2ED.js";
|
|
41
41
|
import {
|
|
42
42
|
GLOBAL_FLAGS,
|
|
43
43
|
WRITE_SINGLE_FLAGS,
|
|
@@ -45,11 +45,11 @@ import {
|
|
|
45
45
|
} from "./chunk-RYWWSZUH.js";
|
|
46
46
|
import {
|
|
47
47
|
DESCRIPTIONS
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-FBBZVIFJ.js";
|
|
49
49
|
import {
|
|
50
50
|
resolveTextOrStdin
|
|
51
51
|
} from "./chunk-ZYURL5VK.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-QW5K5DTC.js";
|
|
53
53
|
|
|
54
54
|
// src/commands/comment.ts
|
|
55
55
|
import { defineCommand } from "citty";
|
|
@@ -78,7 +78,7 @@ function buildListQuery(flags, out) {
|
|
|
78
78
|
async function handleSdkError(err, outOpts, out) {
|
|
79
79
|
const { CurviateError } = await import("@curviate/sdk");
|
|
80
80
|
if (err instanceof CurviateError) {
|
|
81
|
-
const { getExitCode } = await import("./exit-codes-
|
|
81
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
82
82
|
renderError(err, outOpts, out);
|
|
83
83
|
process.exit(getExitCode(err));
|
|
84
84
|
}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sentAsNotice
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
AttachError,
|
|
7
|
-
readAttachment,
|
|
8
|
-
toAttachmentPayload
|
|
9
|
-
} from "./chunk-5I6JJJIV.js";
|
|
4
|
+
} from "./chunk-EUNZGSPN.js";
|
|
10
5
|
import "./chunk-UWO2D4HW.js";
|
|
11
6
|
import {
|
|
12
7
|
AS_ACCOUNT,
|
|
@@ -24,9 +19,14 @@ import {
|
|
|
24
19
|
slimSearchPeople,
|
|
25
20
|
slimSearchPosts
|
|
26
21
|
} from "./chunk-XDG3TOKG.js";
|
|
22
|
+
import {
|
|
23
|
+
AttachError,
|
|
24
|
+
readAttachment,
|
|
25
|
+
toAttachmentPayload
|
|
26
|
+
} from "./chunk-VHNF6OZD.js";
|
|
27
27
|
import {
|
|
28
28
|
requireAccount
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-4J4WTYUY.js";
|
|
30
30
|
import {
|
|
31
31
|
buildPreviewOutput
|
|
32
32
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
readablePage,
|
|
40
40
|
rejectPaginationModifiersWithoutAll,
|
|
41
41
|
streamAll
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-S26VKVWW.js";
|
|
43
43
|
import {
|
|
44
44
|
renderError,
|
|
45
45
|
renderSuccess,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
createClient,
|
|
51
51
|
resolveEffectiveConfig
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-BRUQT2ED.js";
|
|
53
53
|
import {
|
|
54
54
|
GLOBAL_FLAGS,
|
|
55
55
|
READ_SINGLE_FLAGS,
|
|
@@ -58,12 +58,12 @@ import {
|
|
|
58
58
|
} from "./chunk-RYWWSZUH.js";
|
|
59
59
|
import {
|
|
60
60
|
DESCRIPTIONS
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-FBBZVIFJ.js";
|
|
62
62
|
import "./chunk-FDJMAF7D.js";
|
|
63
63
|
import {
|
|
64
64
|
resolveTextOrStdin
|
|
65
65
|
} from "./chunk-ZYURL5VK.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-QW5K5DTC.js";
|
|
67
67
|
|
|
68
68
|
// src/commands/company.ts
|
|
69
69
|
import { defineCommand } from "citty";
|
|
@@ -97,7 +97,7 @@ async function resolveCompanyId(ns, raw) {
|
|
|
97
97
|
async function handleSdkError(err, outOpts, out) {
|
|
98
98
|
const { CurviateError } = await import("@curviate/sdk");
|
|
99
99
|
if (err instanceof CurviateError) {
|
|
100
|
-
const { getExitCode } = await import("./exit-codes-
|
|
100
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
101
101
|
renderError(err, outOpts, out);
|
|
102
102
|
process.exit(getExitCode(err));
|
|
103
103
|
}
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
setActiveProfile,
|
|
13
13
|
updateProfileField,
|
|
14
14
|
withoutUserinfo
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BRUQT2ED.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS
|
|
18
18
|
} from "./chunk-RYWWSZUH.js";
|
|
19
19
|
import {
|
|
20
20
|
DESCRIPTIONS
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FBBZVIFJ.js";
|
|
22
22
|
import "./chunk-ZYURL5VK.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/config.ts
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-XDG3TOKG.js";
|
|
16
16
|
import {
|
|
17
17
|
requireAccount
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4J4WTYUY.js";
|
|
19
19
|
import {
|
|
20
20
|
buildPreviewOutput
|
|
21
21
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
readablePage,
|
|
27
27
|
rejectPaginationModifiersWithoutAll,
|
|
28
28
|
streamAll
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-S26VKVWW.js";
|
|
30
30
|
import {
|
|
31
31
|
renderError,
|
|
32
32
|
renderSuccess,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
createClient,
|
|
38
38
|
resolveEffectiveConfig
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-BRUQT2ED.js";
|
|
40
40
|
import {
|
|
41
41
|
GLOBAL_FLAGS,
|
|
42
42
|
WRITE_FLAGS,
|
|
@@ -44,12 +44,12 @@ import {
|
|
|
44
44
|
} from "./chunk-RYWWSZUH.js";
|
|
45
45
|
import {
|
|
46
46
|
DESCRIPTIONS
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-FBBZVIFJ.js";
|
|
48
48
|
import {
|
|
49
49
|
nearestSubcommand
|
|
50
50
|
} from "./chunk-FDJMAF7D.js";
|
|
51
51
|
import "./chunk-ZYURL5VK.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-QW5K5DTC.js";
|
|
53
53
|
|
|
54
54
|
// src/commands/connect.ts
|
|
55
55
|
import { defineCommand } from "citty";
|
|
@@ -93,7 +93,7 @@ async function runConnectSend(client, flags, out) {
|
|
|
93
93
|
} catch (err) {
|
|
94
94
|
const { CurviateError } = await import("@curviate/sdk");
|
|
95
95
|
if (err instanceof CurviateError) {
|
|
96
|
-
const { getExitCode } = await import("./exit-codes-
|
|
96
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
97
97
|
renderError(err, outOpts, out);
|
|
98
98
|
process.exit(getExitCode(err));
|
|
99
99
|
}
|
|
@@ -132,7 +132,7 @@ async function runConnectSent(client, flags, out) {
|
|
|
132
132
|
} catch (err) {
|
|
133
133
|
const { CurviateError } = await import("@curviate/sdk");
|
|
134
134
|
if (err instanceof CurviateError) {
|
|
135
|
-
const { getExitCode } = await import("./exit-codes-
|
|
135
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
136
136
|
renderError(err, outOpts, out);
|
|
137
137
|
process.exit(getExitCode(err));
|
|
138
138
|
}
|
|
@@ -171,7 +171,7 @@ async function runConnectReceived(client, flags, out) {
|
|
|
171
171
|
} catch (err) {
|
|
172
172
|
const { CurviateError } = await import("@curviate/sdk");
|
|
173
173
|
if (err instanceof CurviateError) {
|
|
174
|
-
const { getExitCode } = await import("./exit-codes-
|
|
174
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
175
175
|
renderError(err, outOpts, out);
|
|
176
176
|
process.exit(getExitCode(err));
|
|
177
177
|
}
|
|
@@ -200,7 +200,7 @@ async function runConnectAccept(client, flags, out) {
|
|
|
200
200
|
} catch (err) {
|
|
201
201
|
const { CurviateError } = await import("@curviate/sdk");
|
|
202
202
|
if (err instanceof CurviateError) {
|
|
203
|
-
const { getExitCode } = await import("./exit-codes-
|
|
203
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
204
204
|
renderError(err, outOpts, out);
|
|
205
205
|
process.exit(getExitCode(err));
|
|
206
206
|
}
|
|
@@ -229,7 +229,7 @@ async function runConnectDecline(client, flags, out) {
|
|
|
229
229
|
} catch (err) {
|
|
230
230
|
const { CurviateError } = await import("@curviate/sdk");
|
|
231
231
|
if (err instanceof CurviateError) {
|
|
232
|
-
const { getExitCode } = await import("./exit-codes-
|
|
232
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
233
233
|
renderError(err, outOpts, out);
|
|
234
234
|
process.exit(getExitCode(err));
|
|
235
235
|
}
|
|
@@ -258,7 +258,7 @@ async function runConnectCancel(client, flags, out) {
|
|
|
258
258
|
} catch (err) {
|
|
259
259
|
const { CurviateError } = await import("@curviate/sdk");
|
|
260
260
|
if (err instanceof CurviateError) {
|
|
261
|
-
const { getExitCode } = await import("./exit-codes-
|
|
261
|
+
const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
|
|
262
262
|
renderError(err, outOpts, out);
|
|
263
263
|
process.exit(getExitCode(err));
|
|
264
264
|
}
|