@curviate/cli 0.46.1 → 0.47.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +33 -0
  3. package/dist/{account-O5UX5UAH.js → account-RFJ63QYL.js} +3 -3
  4. package/dist/{chunk-BGZW6B7G.js → chunk-5I6JJJIV.js} +1 -0
  5. package/dist/{chunk-76E3O6HY.js → chunk-76SWLAZ6.js} +13 -0
  6. package/dist/{chunk-DGIDAO2H.js → chunk-ERBYEC5P.js} +1 -1
  7. package/dist/{chunk-LD6WPZZM.js → chunk-FXYK2GTO.js} +4 -4
  8. package/dist/{chunk-2FECYCAC.js → chunk-PD2I5TYC.js} +2 -2
  9. package/dist/{chunk-FXF5FF3W.js → chunk-V3MVOVQT.js} +2 -1
  10. package/dist/cli.js +21 -20
  11. package/dist/{comment-BKGVJYS2.js → comment-MCXE7B7V.js} +6 -6
  12. package/dist/{company-F2AZTDPK.js → company-EUUN372H.js} +6 -6
  13. package/dist/{connect-TX6PT7NV.js → connect-2AL7XVJO.js} +9 -9
  14. package/dist/{doctor-USTZQ75D.js → doctor-WPYI7X2T.js} +2 -2
  15. package/dist/draft-G65DVXT7.js +458 -0
  16. package/dist/{exit-codes-TMAIV7EM.js → exit-codes-AW6KHDDN.js} +1 -1
  17. package/dist/{feed-ANBPRGFQ.js → feed-HV24WME4.js} +4 -4
  18. package/dist/{group-HFF7LDDQ.js → group-HADXNVJW.js} +4 -4
  19. package/dist/{inbox-XQMGW6RT.js → inbox-G3EE54OB.js} +4 -4
  20. package/dist/{inboxes-CILMIVVD.js → inboxes-237XOBTP.js} +4 -4
  21. package/dist/{job-TOJDDJ2P.js → job-LIN6RWD7.js} +4 -4
  22. package/dist/{message-WCBNBPAJ.js → message-U2O2JQSW.js} +5 -5
  23. package/dist/{notification-CJ3LEHFL.js → notification-3VG32LWM.js} +4 -4
  24. package/dist/{post-OQWJRL4B.js → post-ECDK2KJL.js} +6 -6
  25. package/dist/{profile-GT6ZD37M.js → profile-JOHS6SDW.js} +10 -10
  26. package/dist/{recruiter-ZKWG6QG3.js → recruiter-7VXEIXN3.js} +5 -5
  27. package/dist/{sales-nav-WV3YHYD6.js → sales-nav-K4BMBH7R.js} +5 -5
  28. package/dist/{search-VAZEQ2WJ.js → search-C2UYO6PI.js} +12 -12
  29. package/dist/{setup-GGXMHXAF.js → setup-GYEZFDEN.js} +2 -2
  30. package/dist/{webhook-5M47UX6U.js → webhook-KCOQOH7D.js} +7 -7
  31. package/package.json +2 -2
@@ -0,0 +1,458 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ AttachError,
4
+ guessContentType,
5
+ readAttachment,
6
+ toAttachmentPayload
7
+ } from "./chunk-5I6JJJIV.js";
8
+ import {
9
+ buildPreviewOutput
10
+ } from "./chunk-TCUYH5GO.js";
11
+ import {
12
+ pageDelayFromFlags,
13
+ readCursorFlag,
14
+ readMaxPagesFlag,
15
+ readableObject,
16
+ readablePage,
17
+ rejectPaginationModifiersWithoutAll,
18
+ renderError,
19
+ renderSuccess,
20
+ renderUnexpectedError,
21
+ resolveEffectiveConfig,
22
+ streamAll,
23
+ writeNdjsonItem
24
+ } from "./chunk-V3MVOVQT.js";
25
+ import {
26
+ createClient
27
+ } from "./chunk-UJOTQPL6.js";
28
+ import {
29
+ GLOBAL_FLAGS,
30
+ READ_SINGLE_FLAGS,
31
+ WRITE_SINGLE_FLAGS,
32
+ readOnly,
33
+ resolveTextOrStdin
34
+ } from "./chunk-TC4ZPUWI.js";
35
+
36
+ // src/commands/draft.ts
37
+ import { defineCommand } from "citty";
38
+ import { basename } from "path";
39
+ var INLINE_FILE_BYTES = 5 * 1024 * 1024;
40
+ var MAX_IMAGE_BYTES = 5 * 1024 * 1024;
41
+ var INLINE_BODY_BYTES = 9 * 1024 * 1024;
42
+ var LIST_STATUSES = ["draft", "scheduled", "failed", "published"];
43
+ function buildOutputStreams() {
44
+ return {
45
+ stdout: { write: (s) => process.stdout.write(s) },
46
+ stderr: { write: (s) => process.stderr.write(s) }
47
+ };
48
+ }
49
+ function resolveOutputOpts(flags) {
50
+ return {
51
+ json: (flags.json ?? false) || !process.stdout.isTTY,
52
+ isTTY: process.stdout.isTTY ?? false,
53
+ fields: flags.fields
54
+ };
55
+ }
56
+ function rejectAllOnNonPaginated(all, out) {
57
+ if (all) {
58
+ out.stderr.write("error: --all is not supported on non-paginated commands.\n");
59
+ process.exit(2);
60
+ }
61
+ }
62
+ async function handleError(err, outOpts, out) {
63
+ const { CurviateError } = await import("@curviate/sdk");
64
+ if (err instanceof CurviateError) {
65
+ const { getExitCode } = await import("./exit-codes-AW6KHDDN.js");
66
+ renderError(err, outOpts, out);
67
+ process.exit(getExitCode(err));
68
+ }
69
+ renderUnexpectedError(err, out);
70
+ process.exit(1);
71
+ }
72
+ function readAccount(flags, out) {
73
+ if (flags.account === void 0) return void 0;
74
+ if (flags.account.trim() === "") {
75
+ out.stderr.write("error: --account was given an empty value. Pass an acc_... id, or omit the flag for a Draft with no account.\n");
76
+ process.exit(2);
77
+ }
78
+ return flags.account;
79
+ }
80
+ function readSchedule(flags, out) {
81
+ if (flags["schedule-at"] !== void 0 && flags.unschedule) {
82
+ out.stderr.write("error: --schedule-at and --unschedule cannot be combined.\n");
83
+ process.exit(2);
84
+ }
85
+ if (flags["schedule-at"] !== void 0) {
86
+ if (flags["schedule-at"].trim() === "") {
87
+ out.stderr.write("error: --schedule-at was given an empty value. Pass an ISO 8601 time with an offset, e.g. 2026-10-12T09:00:00+02:00, or use --unschedule.\n");
88
+ process.exit(2);
89
+ }
90
+ return { scheduled_at: flags["schedule-at"] };
91
+ }
92
+ if (flags.unschedule) return { scheduled_at: null };
93
+ return {};
94
+ }
95
+ function attachPaths(attach) {
96
+ if (!attach) return [];
97
+ return Array.isArray(attach) ? attach : [attach];
98
+ }
99
+ async function loadFiles(paths, out) {
100
+ try {
101
+ return await Promise.all(paths.map(async (path) => ({ path, buf: await readAttachment(path) })));
102
+ } catch (err) {
103
+ if (err instanceof AttachError) {
104
+ out.stderr.write(`error: ${err.message}
105
+ `);
106
+ process.exit(err.exitCode);
107
+ }
108
+ throw err;
109
+ }
110
+ }
111
+ function refuseOversizeImages(files, out) {
112
+ for (const f of files) {
113
+ if (guessContentType(f.path).startsWith("image/") && f.buf.byteLength > MAX_IMAGE_BYTES) {
114
+ out.stderr.write(
115
+ `error: ${basename(f.path)} is an image over 5 MiB (${f.buf.byteLength} bytes). Images are capped at 5 MiB; resize it. Nothing was sent.
116
+ `
117
+ );
118
+ process.exit(2);
119
+ }
120
+ }
121
+ }
122
+ function planAttachments(files) {
123
+ let bodyBytes = 0;
124
+ let i = 0;
125
+ for (; i < files.length; i++) {
126
+ const size = files[i].buf.byteLength;
127
+ const encoded = Math.ceil(size / 3) * 4;
128
+ if (size > INLINE_FILE_BYTES || bodyBytes + encoded > INLINE_BODY_BYTES) break;
129
+ bodyBytes += encoded;
130
+ }
131
+ return { inline: files.slice(0, i), upload: files.slice(i) };
132
+ }
133
+ function previewAttachments(files) {
134
+ return files.map((f) => ({ name: basename(f.path), buffer: f.buf }));
135
+ }
136
+ async function uploadAll(client, draftId, files, out) {
137
+ let last;
138
+ for (const f of files) {
139
+ try {
140
+ last = await client.drafts.uploadAttachment(draftId, f.buf, {
141
+ filename: basename(f.path),
142
+ contentType: guessContentType(f.path)
143
+ });
144
+ } catch (err) {
145
+ out.stderr.write(`error: uploading ${basename(f.path)} to draft ${draftId} failed; the Draft exists with the files before it. Fix the cause and add the rest with \`curviate draft update ${draftId} --attach <file>\`.
146
+ `);
147
+ throw err;
148
+ }
149
+ }
150
+ return last;
151
+ }
152
+ async function runDraftList(client, flags, out) {
153
+ rejectPaginationModifiersWithoutAll(flags, out);
154
+ const outOpts = resolveOutputOpts(flags);
155
+ const all = flags.all ?? false;
156
+ const maxPages = readMaxPagesFlag(flags, out);
157
+ const cursor = readCursorFlag(flags, out);
158
+ const params = {};
159
+ if (flags.status !== void 0) {
160
+ const status = flags.status.split(",").map((s) => s.trim()).filter(Boolean);
161
+ const bad = status.filter((s) => !LIST_STATUSES.includes(s));
162
+ if (status.length === 0 || bad.length > 0) {
163
+ out.stderr.write(`error: --status takes a comma list of ${LIST_STATUSES.join(", ")}${bad.length ? `. Got: ${bad.join(", ")}` : ""}.
164
+ `);
165
+ process.exit(2);
166
+ }
167
+ params["status"] = status;
168
+ }
169
+ const account = readAccount(flags, out);
170
+ if (account !== void 0) params["account_id"] = account;
171
+ if (flags.from !== void 0) params["from"] = flags.from;
172
+ if (flags.to !== void 0) params["to"] = flags.to;
173
+ if (flags.order !== void 0) {
174
+ if (flags.order !== "asc" && flags.order !== "desc") {
175
+ out.stderr.write("error: --order takes asc or desc.\n");
176
+ process.exit(2);
177
+ }
178
+ params["order"] = flags.order;
179
+ }
180
+ if (flags.limit !== void 0) params["limit"] = parseInt(flags.limit, 10);
181
+ if (cursor) params["cursor"] = cursor;
182
+ try {
183
+ if (all) {
184
+ const fn = (p) => client.drafts.list(p);
185
+ for await (const item of streamAll(fn, params, { maxPages, out, pageDelayMs: pageDelayFromFlags(flags) })) {
186
+ writeNdjsonItem(out, item, outOpts.fields);
187
+ }
188
+ } else {
189
+ const result = await client.drafts.list(params);
190
+ readablePage(result);
191
+ renderSuccess(result, outOpts, out);
192
+ }
193
+ } catch (err) {
194
+ await handleError(err, outOpts, out);
195
+ }
196
+ }
197
+ async function runDraftGet(client, flags, out) {
198
+ rejectAllOnNonPaginated(flags.all, out);
199
+ const outOpts = resolveOutputOpts(flags);
200
+ try {
201
+ const result = await client.drafts.get(flags.id ?? "");
202
+ readableObject(result);
203
+ renderSuccess(result, outOpts, out);
204
+ } catch (err) {
205
+ await handleError(err, outOpts, out);
206
+ }
207
+ }
208
+ async function runDraftCreate(client, flags, out, readStdin) {
209
+ const body = {};
210
+ if (flags.unschedule) {
211
+ out.stderr.write("error: --unschedule applies to `draft update`; a new Draft is unscheduled unless you pass --schedule-at.\n");
212
+ process.exit(2);
213
+ }
214
+ const account = readAccount(flags, out);
215
+ if (account !== void 0) body["account_id"] = account;
216
+ if (flags.text !== void 0) body["text"] = await resolveTextOrStdin(flags.text, out, readStdin);
217
+ Object.assign(body, readSchedule(flags, out));
218
+ const files = await loadFiles(attachPaths(flags.attach), out);
219
+ refuseOversizeImages(files, out);
220
+ const { inline, upload } = planAttachments(files);
221
+ if (inline.length > 0) body["attachments"] = inline.map((f) => toAttachmentPayload(f.path, f.buf));
222
+ const outOpts = resolveOutputOpts(flags);
223
+ if (flags.preview) {
224
+ const preview = buildPreviewOutput({
225
+ method: "drafts.create",
226
+ args: {},
227
+ body: { ...body, attachments: void 0 },
228
+ attachments: previewAttachments(inline)
229
+ });
230
+ out.stdout.write(JSON.stringify({ ...preview, ...upload.length ? { uploads: upload.map((f) => `${basename(f.path)} (${f.buf.byteLength} bytes)`) } : {} }) + "\n");
231
+ return;
232
+ }
233
+ try {
234
+ const created = await client.drafts.create(body);
235
+ const result = upload.length > 0 ? await uploadAll(client, created.id, upload, out) : created;
236
+ renderSuccess(result, outOpts, out);
237
+ } catch (err) {
238
+ await handleError(err, outOpts, out);
239
+ }
240
+ }
241
+ async function runDraftUpdate(client, flags, out, readStdin) {
242
+ const id = flags.id ?? "";
243
+ const body = {};
244
+ const account = readAccount(flags, out);
245
+ if (account !== void 0) body["account_id"] = account;
246
+ if (flags.text !== void 0) body["text"] = await resolveTextOrStdin(flags.text, out, readStdin);
247
+ Object.assign(body, readSchedule(flags, out));
248
+ const files = await loadFiles(attachPaths(flags.attach), out);
249
+ refuseOversizeImages(files, out);
250
+ const { inline, upload } = planAttachments(files);
251
+ const outOpts = resolveOutputOpts(flags);
252
+ if (flags.preview) {
253
+ const preview = buildPreviewOutput({
254
+ method: "drafts.update",
255
+ args: { id },
256
+ body,
257
+ attachments: previewAttachments(inline)
258
+ });
259
+ out.stdout.write(JSON.stringify({ ...preview, ...upload.length ? { uploads: upload.map((f) => `${basename(f.path)} (${f.buf.byteLength} bytes)`) } : {} }) + "\n");
260
+ return;
261
+ }
262
+ try {
263
+ if (inline.length > 0) {
264
+ const current = await client.drafts.get(id);
265
+ body["attachments"] = [
266
+ ...(current.attachments ?? []).map((a) => ({ id: a.id })),
267
+ ...inline.map((f) => toAttachmentPayload(f.path, f.buf))
268
+ ];
269
+ }
270
+ let result = await client.drafts.update(id, body);
271
+ if (upload.length > 0) result = await uploadAll(client, id, upload, out);
272
+ renderSuccess(result, outOpts, out);
273
+ } catch (err) {
274
+ await handleError(err, outOpts, out);
275
+ }
276
+ }
277
+ async function runDraftDelete(client, flags, out) {
278
+ const id = flags.id ?? "";
279
+ const outOpts = resolveOutputOpts(flags);
280
+ if (flags.preview) {
281
+ out.stdout.write(JSON.stringify(buildPreviewOutput({ method: "drafts.delete", args: { id }, body: {} })) + "\n");
282
+ return;
283
+ }
284
+ try {
285
+ const result = await client.drafts.delete(id);
286
+ renderSuccess(result, outOpts, out);
287
+ } catch (err) {
288
+ await handleError(err, outOpts, out);
289
+ }
290
+ }
291
+ async function runDraftPublish(client, flags, out) {
292
+ const id = flags.id ?? "";
293
+ const outOpts = resolveOutputOpts(flags);
294
+ if (flags.preview) {
295
+ out.stdout.write(JSON.stringify(buildPreviewOutput({ method: "drafts.publish", args: { id }, body: {} })) + "\n");
296
+ return;
297
+ }
298
+ try {
299
+ const result = await client.drafts.publish(id);
300
+ renderSuccess(result, outOpts, out);
301
+ } catch (err) {
302
+ await handleError(err, outOpts, out);
303
+ }
304
+ }
305
+ async function withClient(flags, fn) {
306
+ const cfg = await resolveEffectiveConfig({
307
+ apiKey: flags["api-key"],
308
+ baseUrl: flags["base-url"],
309
+ timeout: flags.timeout,
310
+ profile: flags.profile
311
+ });
312
+ if (!cfg.apiKey) {
313
+ process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
314
+ process.exit(3);
315
+ }
316
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
317
+ await fn(client, flags, buildOutputStreams());
318
+ }
319
+ var ACCOUNT_DESC = "Account the Draft publishes as (acc_...). Never defaulted: omit it for a Draft with no account yet.";
320
+ var SCHEDULE_DESC = "Publish at this time: ISO 8601 with an offset (e.g. 2026-10-12T09:00:00+02:00), passed through unchanged. Between 5 minutes and 365 days ahead, at least 5 minutes from another scheduled Draft on the same account. Needs an account and text.";
321
+ var ATTACH_DESC = "File to attach, repeatable; keeps the order given. Files up to 5 MiB go inline, larger ones upload separately. Up to 20 images (JPEG, PNG, GIF, WEBP, each up to 5 MiB), or one MP4 video, or one PDF (each up to 50 MiB), never mixed.";
322
+ var draftListCommand = defineCommand({
323
+ meta: {
324
+ name: "list",
325
+ description: "List Drafts, newest first. With --status published it lists publish records instead (post id, account, time; never Drafts).",
326
+ examples: [
327
+ "curviate draft list",
328
+ "curviate draft list --status scheduled --account acc_YOUR_ACCOUNT_ID --order asc",
329
+ "curviate draft list --status scheduled,published --from 2026-10-01T00:00:00Z --to 2026-11-01T00:00:00Z"
330
+ ]
331
+ },
332
+ args: {
333
+ ...readOnly(GLOBAL_FLAGS),
334
+ status: { type: "string", description: "Comma list of draft, scheduled, failed, published (default draft,scheduled,failed)." },
335
+ account: { type: "string", description: "Only this account's items (acc_...), or none for Drafts with no account. Omit for all of yours." },
336
+ from: { type: "string", description: "Only items dated at or after this ISO 8601 time (each item's own date: scheduled_at, failure.failed_at, published_at or updated_at)." },
337
+ to: { type: "string", description: "Only items dated before this ISO 8601 time (exclusive)." },
338
+ order: { type: "string", description: "desc (default) or asc, by the item's own date." }
339
+ },
340
+ async run({ args }) {
341
+ await withClient(args, runDraftList);
342
+ }
343
+ });
344
+ var draftGetCommand = defineCommand({
345
+ meta: {
346
+ name: "get",
347
+ description: "Get one Draft, with a fresh signed link (valid 1 hour) for each attachment.",
348
+ examples: ["curviate draft get drf_YOUR_DRAFT_ID"]
349
+ },
350
+ args: {
351
+ ...readOnly(READ_SINGLE_FLAGS),
352
+ id: { type: "positional", description: "Draft id (drf_...)." }
353
+ },
354
+ async run({ args }) {
355
+ await withClient(args, runDraftGet);
356
+ }
357
+ });
358
+ var draftCreateCommand = defineCommand({
359
+ meta: {
360
+ name: "create",
361
+ description: "Store a Draft. Every part is optional. With --schedule-at (and an account and text) Curviate publishes it at that time. Up to 50 Drafts and 2 GiB of media per account, and per no-account. A retry creates a second Draft.",
362
+ examples: [
363
+ 'curviate draft create "Three things we learned shipping our first agent integration."',
364
+ 'curviate draft create "Launch day." --account acc_YOUR_ACCOUNT_ID --schedule-at 2026-10-12T09:00:00+02:00',
365
+ 'curviate draft create "Demo." --account acc_YOUR_ACCOUNT_ID --attach screenshot.png'
366
+ ]
367
+ },
368
+ args: {
369
+ ...WRITE_SINGLE_FLAGS,
370
+ text: { type: "positional", required: false, stdinArg: true, description: "Post text (up to 3000 characters). Pass - to read from stdin." },
371
+ account: { type: "string", description: ACCOUNT_DESC },
372
+ "schedule-at": { type: "string", description: SCHEDULE_DESC },
373
+ attach: { type: "string", description: ATTACH_DESC }
374
+ },
375
+ async run({ args }) {
376
+ await withClient(args, runDraftCreate);
377
+ }
378
+ });
379
+ var draftUpdateCommand = defineCommand({
380
+ meta: {
381
+ name: "update",
382
+ description: "Change a Draft: only the parts you pass change. --attach appends files; --schedule-at schedules or reschedules, --unschedule cancels. Any update to a failed Draft clears its failure. A Draft being published answers DRAFT_PUBLISHING: read it again in a few seconds.",
383
+ examples: [
384
+ 'curviate draft update drf_YOUR_DRAFT_ID --text "New wording."',
385
+ "curviate draft update drf_YOUR_DRAFT_ID --schedule-at 2026-10-12T09:00:00+02:00",
386
+ "curviate draft update drf_YOUR_DRAFT_ID --unschedule"
387
+ ]
388
+ },
389
+ args: {
390
+ ...WRITE_SINGLE_FLAGS,
391
+ id: { type: "positional", description: "Draft id (drf_...)." },
392
+ text: { type: "string", stdinArg: true, description: "Replace the text (up to 3000 characters). Pass - to read from stdin." },
393
+ account: { type: "string", description: "Move the Draft to another of your accounts (acc_...)." },
394
+ "schedule-at": { type: "string", description: SCHEDULE_DESC },
395
+ unschedule: { type: "boolean", description: "Cancel the schedule; the Draft stays a Draft." },
396
+ attach: { type: "string", description: ATTACH_DESC }
397
+ },
398
+ async run({ args }) {
399
+ await withClient(args, runDraftUpdate);
400
+ }
401
+ });
402
+ var draftDeleteCommand = defineCommand({
403
+ meta: {
404
+ name: "delete",
405
+ description: "Delete a Draft and its stored media.",
406
+ examples: ["curviate draft delete drf_YOUR_DRAFT_ID"]
407
+ },
408
+ args: {
409
+ ...WRITE_SINGLE_FLAGS,
410
+ id: { type: "positional", description: "Draft id (drf_...)." }
411
+ },
412
+ async run({ args }) {
413
+ await withClient(args, runDraftDelete);
414
+ }
415
+ });
416
+ var draftPublishCommand = defineCommand({
417
+ meta: {
418
+ name: "publish",
419
+ description: "Publish a Draft now, under the same rules and safety limits as `post create`. Success deletes the Draft and prints the post id; a known failure leaves the Draft unchanged. If the error says the outcome is unknown, the post may be live: check the account's posts before retrying.",
420
+ examples: ["curviate draft publish drf_YOUR_DRAFT_ID"]
421
+ },
422
+ args: {
423
+ ...WRITE_SINGLE_FLAGS,
424
+ id: { type: "positional", description: "Draft id (drf_...)." }
425
+ },
426
+ async run({ args }) {
427
+ await withClient(args, runDraftPublish);
428
+ }
429
+ });
430
+ var draftCommand = defineCommand({
431
+ meta: { name: "draft", description: "Drafts and scheduled posts." },
432
+ subCommands: {
433
+ list: draftListCommand,
434
+ get: draftGetCommand,
435
+ create: draftCreateCommand,
436
+ update: draftUpdateCommand,
437
+ delete: draftDeleteCommand,
438
+ publish: draftPublishCommand
439
+ },
440
+ async run() {
441
+ process.stderr.write(
442
+ 'Usage: curviate draft <subcommand>\n list | get <id> | create ["<text>"] | update <id> | delete <id> | publish <id>\n'
443
+ );
444
+ }
445
+ });
446
+ export {
447
+ INLINE_BODY_BYTES,
448
+ INLINE_FILE_BYTES,
449
+ MAX_IMAGE_BYTES,
450
+ draftCommand,
451
+ planAttachments,
452
+ runDraftCreate,
453
+ runDraftDelete,
454
+ runDraftGet,
455
+ runDraftList,
456
+ runDraftPublish,
457
+ runDraftUpdate
458
+ };
@@ -3,7 +3,7 @@ import {
3
3
  AUTH_NEEDED,
4
4
  EXIT_CODE_MAP,
5
5
  getExitCode
6
- } from "./chunk-76E3O6HY.js";
6
+ } from "./chunk-76SWLAZ6.js";
7
7
  export {
8
8
  AUTH_NEEDED,
9
9
  EXIT_CODE_MAP,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-2FECYCAC.js";
4
+ } from "./chunk-PD2I5TYC.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
7
  readCursorFlag,
@@ -14,8 +14,8 @@ import {
14
14
  resolveEffectiveConfig,
15
15
  streamAll,
16
16
  writeNdjsonItem
17
- } from "./chunk-FXF5FF3W.js";
18
- import "./chunk-76E3O6HY.js";
17
+ } from "./chunk-V3MVOVQT.js";
18
+ import "./chunk-76SWLAZ6.js";
19
19
  import {
20
20
  createClient
21
21
  } from "./chunk-UJOTQPL6.js";
@@ -43,7 +43,7 @@ function resolveOutputOpts(flags) {
43
43
  async function handleSdkError(err, outOpts, out) {
44
44
  const { CurviateError } = await import("@curviate/sdk");
45
45
  if (err instanceof CurviateError) {
46
- const { getExitCode } = await import("./exit-codes-TMAIV7EM.js");
46
+ const { getExitCode } = await import("./exit-codes-AW6KHDDN.js");
47
47
  renderError(err, outOpts, out);
48
48
  process.exit(getExitCode(err));
49
49
  }
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-UEAX6KUB.js";
5
5
  import {
6
6
  requireAccount
7
- } from "./chunk-2FECYCAC.js";
7
+ } from "./chunk-PD2I5TYC.js";
8
8
  import {
9
9
  pageDelayFromFlags,
10
10
  readCursorFlag,
@@ -18,8 +18,8 @@ import {
18
18
  resolveEffectiveConfig,
19
19
  streamAll,
20
20
  writeNdjsonItem
21
- } from "./chunk-FXF5FF3W.js";
22
- import "./chunk-76E3O6HY.js";
21
+ } from "./chunk-V3MVOVQT.js";
22
+ import "./chunk-76SWLAZ6.js";
23
23
  import {
24
24
  createClient
25
25
  } from "./chunk-UJOTQPL6.js";
@@ -54,7 +54,7 @@ function resolveOutputOpts(flags) {
54
54
  async function handleSdkError(err, outOpts, out) {
55
55
  const { CurviateError } = await import("@curviate/sdk");
56
56
  if (err instanceof CurviateError) {
57
- const { getExitCode } = await import("./exit-codes-TMAIV7EM.js");
57
+ const { getExitCode } = await import("./exit-codes-AW6KHDDN.js");
58
58
  renderError(err, outOpts, out);
59
59
  process.exit(getExitCode(err));
60
60
  }
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-UEAX6KUB.js";
9
9
  import {
10
10
  requireAccount
11
- } from "./chunk-2FECYCAC.js";
11
+ } from "./chunk-PD2I5TYC.js";
12
12
  import {
13
13
  buildPreviewOutput
14
14
  } from "./chunk-TCUYH5GO.js";
@@ -25,8 +25,8 @@ import {
25
25
  resolveEffectiveConfig,
26
26
  streamAll,
27
27
  writeNdjsonItem
28
- } from "./chunk-FXF5FF3W.js";
29
- import "./chunk-76E3O6HY.js";
28
+ } from "./chunk-V3MVOVQT.js";
29
+ import "./chunk-76SWLAZ6.js";
30
30
  import {
31
31
  createClient
32
32
  } from "./chunk-UJOTQPL6.js";
@@ -97,7 +97,7 @@ function validateInboxFolder(raw, out) {
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-TMAIV7EM.js");
100
+ const { getExitCode } = await import("./exit-codes-AW6KHDDN.js");
101
101
  renderError(err, outOpts, out);
102
102
  process.exit(getExitCode(err));
103
103
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-2FECYCAC.js";
4
+ } from "./chunk-PD2I5TYC.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
7
  readCursorFlag,
@@ -15,8 +15,8 @@ import {
15
15
  resolveEffectiveConfig,
16
16
  streamAll,
17
17
  writeNdjsonItem
18
- } from "./chunk-FXF5FF3W.js";
19
- import "./chunk-76E3O6HY.js";
18
+ } from "./chunk-V3MVOVQT.js";
19
+ import "./chunk-76SWLAZ6.js";
20
20
  import {
21
21
  createClient
22
22
  } from "./chunk-UJOTQPL6.js";
@@ -51,7 +51,7 @@ function resolveOutputOpts(flags) {
51
51
  async function handleSdkError(err, outOpts, out) {
52
52
  const { CurviateError } = await import("@curviate/sdk");
53
53
  if (err instanceof CurviateError) {
54
- const { getExitCode } = await import("./exit-codes-TMAIV7EM.js");
54
+ const { getExitCode } = await import("./exit-codes-AW6KHDDN.js");
55
55
  renderError(err, outOpts, out);
56
56
  process.exit(getExitCode(err));
57
57
  }
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-UEAX6KUB.js";
12
12
  import {
13
13
  requireAccount
14
- } from "./chunk-2FECYCAC.js";
14
+ } from "./chunk-PD2I5TYC.js";
15
15
  import {
16
16
  buildPreviewOutput
17
17
  } from "./chunk-TCUYH5GO.js";
@@ -30,8 +30,8 @@ import {
30
30
  resolveEffectiveConfig,
31
31
  streamAll,
32
32
  writeNdjsonItem
33
- } from "./chunk-FXF5FF3W.js";
34
- import "./chunk-76E3O6HY.js";
33
+ } from "./chunk-V3MVOVQT.js";
34
+ import "./chunk-76SWLAZ6.js";
35
35
  import {
36
36
  createClient,
37
37
  downloadBinary
@@ -97,7 +97,7 @@ function requireEnum(value, allowed, flag, out) {
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-TMAIV7EM.js");
100
+ const { getExitCode } = await import("./exit-codes-AW6KHDDN.js");
101
101
  renderError(err, outOpts, out);
102
102
  process.exit(getExitCode(err));
103
103
  }
@@ -13,15 +13,15 @@ import {
13
13
  runMessageSend,
14
14
  sentAsNotice,
15
15
  willSendAsNotice
16
- } from "./chunk-LD6WPZZM.js";
16
+ } from "./chunk-FXYK2GTO.js";
17
17
  import "./chunk-UWO2D4HW.js";
18
18
  import "./chunk-HOQ7EUHJ.js";
19
- import "./chunk-BGZW6B7G.js";
19
+ import "./chunk-5I6JJJIV.js";
20
20
  import "./chunk-UEAX6KUB.js";
21
- import "./chunk-2FECYCAC.js";
21
+ import "./chunk-PD2I5TYC.js";
22
22
  import "./chunk-TCUYH5GO.js";
23
- import "./chunk-FXF5FF3W.js";
24
- import "./chunk-76E3O6HY.js";
23
+ import "./chunk-V3MVOVQT.js";
24
+ import "./chunk-76SWLAZ6.js";
25
25
  import "./chunk-UJOTQPL6.js";
26
26
  import "./chunk-TC4ZPUWI.js";
27
27
  export {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-2FECYCAC.js";
4
+ } from "./chunk-PD2I5TYC.js";
5
5
  import {
6
6
  buildPreviewOutput
7
7
  } from "./chunk-TCUYH5GO.js";
@@ -17,8 +17,8 @@ import {
17
17
  resolveEffectiveConfig,
18
18
  streamAll,
19
19
  writeNdjsonItem
20
- } from "./chunk-FXF5FF3W.js";
21
- import "./chunk-76E3O6HY.js";
20
+ } from "./chunk-V3MVOVQT.js";
21
+ import "./chunk-76SWLAZ6.js";
22
22
  import {
23
23
  createClient
24
24
  } from "./chunk-UJOTQPL6.js";
@@ -47,7 +47,7 @@ function resolveOutputOpts(flags) {
47
47
  async function handleSdkError(err, outOpts, out) {
48
48
  const { CurviateError } = await import("@curviate/sdk");
49
49
  if (err instanceof CurviateError) {
50
- const { getExitCode } = await import("./exit-codes-TMAIV7EM.js");
50
+ const { getExitCode } = await import("./exit-codes-AW6KHDDN.js");
51
51
  renderError(err, outOpts, out);
52
52
  process.exit(getExitCode(err));
53
53
  }