@curviate/cli 0.38.0 → 0.40.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 (27) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +2 -2
  3. package/dist/{account-TYKHUB7X.js → account-LTXAUBBP.js} +5 -3
  4. package/dist/{chunk-ZJ7D3NFS.js → chunk-BGVK73VI.js} +1 -1
  5. package/dist/{chunk-MNDXMGPX.js → chunk-LD5KJSCT.js} +1 -1
  6. package/dist/{chunk-7JU4IXXG.js → chunk-OTBJATDE.js} +27 -1
  7. package/dist/{chunk-BN7L7WSY.js → chunk-T6G5AASF.js} +31 -4
  8. package/dist/cli.js +19 -19
  9. package/dist/{comment-G6RB2PBZ.js → comment-2CSBSBOH.js} +16 -13
  10. package/dist/{company-OWND3W3L.js → company-ZUIUR5UN.js} +32 -21
  11. package/dist/{connect-3E7EC5ZM.js → connect-LSXKNEL2.js} +8 -6
  12. package/dist/{doctor-Z6OSCGKT.js → doctor-FHOHIQPX.js} +1 -1
  13. package/dist/{feed-VDTFIMKN.js → feed-UUHB2FXI.js} +7 -4
  14. package/dist/{group-KDJHY2IM.js → group-NUCO3P2W.js} +10 -6
  15. package/dist/{inbox-DQLX2LR7.js → inbox-DEZTGTPO.js} +14 -11
  16. package/dist/{inboxes-WMNHOPY7.js → inboxes-F3NIQQRK.js} +7 -4
  17. package/dist/{job-ESKS2LDJ.js → job-YMGO3WJH.js} +10 -6
  18. package/dist/{message-5W2R3YHS.js → message-RSBUXI64.js} +3 -3
  19. package/dist/{notification-IGNUH2GR.js → notification-EJ35OD3Q.js} +7 -4
  20. package/dist/{post-NLI76K74.js → post-VHVQ56A7.js} +16 -13
  21. package/dist/{profile-TBKKIICM.js → profile-3CBNI42H.js} +20 -15
  22. package/dist/{recruiter-AEJRHIX5.js → recruiter-M7XUFYNR.js} +18 -15
  23. package/dist/{sales-nav-SW6WJVMD.js → sales-nav-S47OCEUC.js} +44 -19
  24. package/dist/{search-WRMVQU6C.js → search-UWI37MKG.js} +51 -35
  25. package/dist/{setup-YUSWG77F.js → setup-3EQRACT6.js} +1 -1
  26. package/dist/{webhook-NGMRJMQ5.js → webhook-I4U4C4XE.js} +5 -3
  27. package/package.json +2 -2
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readablePage,
4
4
  resolveEffectiveConfig
5
- } from "./chunk-7JU4IXXG.js";
5
+ } from "./chunk-OTBJATDE.js";
6
6
  import {
7
7
  getExitCode
8
8
  } from "./chunk-XZJQQJBE.js";
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-MNDXMGPX.js";
4
+ } from "./chunk-LD5KJSCT.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
+ readCursorFlag,
8
+ readMaxPagesFlag,
7
9
  readablePage,
8
10
  rejectPaginationModifiersWithoutAll,
9
11
  renderError,
@@ -12,7 +14,7 @@ import {
12
14
  resolveEffectiveConfig,
13
15
  streamAll,
14
16
  writeNdjsonItem
15
- } from "./chunk-7JU4IXXG.js";
17
+ } from "./chunk-OTBJATDE.js";
16
18
  import "./chunk-XZJQQJBE.js";
17
19
  import {
18
20
  createClient
@@ -60,11 +62,12 @@ async function runFeedHome(client, flags, out) {
60
62
  const ns = client.account(accountId);
61
63
  const outOpts = resolveOutputOpts(flags);
62
64
  const all = flags.all ?? false;
63
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
65
+ const maxPages = readMaxPagesFlag(flags, out);
64
66
  const params = {};
65
67
  if (flags.sort) params["sort"] = flags.sort;
66
68
  if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
67
- if (flags.cursor) params["cursor"] = flags.cursor;
69
+ const cursor = readCursorFlag(flags, out);
70
+ if (cursor) params["cursor"] = cursor;
68
71
  try {
69
72
  if (all) {
70
73
  const fn = (p) => ns.feed.home(p);
@@ -4,9 +4,11 @@ import {
4
4
  } from "./chunk-UEAX6KUB.js";
5
5
  import {
6
6
  requireAccount
7
- } from "./chunk-MNDXMGPX.js";
7
+ } from "./chunk-LD5KJSCT.js";
8
8
  import {
9
9
  pageDelayFromFlags,
10
+ readCursorFlag,
11
+ readMaxPagesFlag,
10
12
  readablePage,
11
13
  rejectPaginationModifiersWithoutAll,
12
14
  renderError,
@@ -15,7 +17,7 @@ import {
15
17
  resolveEffectiveConfig,
16
18
  streamAll,
17
19
  writeNdjsonItem
18
- } from "./chunk-7JU4IXXG.js";
20
+ } from "./chunk-OTBJATDE.js";
19
21
  import "./chunk-XZJQQJBE.js";
20
22
  import {
21
23
  createClient
@@ -70,11 +72,12 @@ async function runGroupList(client, flags, out) {
70
72
  const ns = client.account(accountId);
71
73
  const outOpts = resolveOutputOpts(flags);
72
74
  const all = flags.all ?? false;
73
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
75
+ const maxPages = readMaxPagesFlag(flags, out);
74
76
  const params = {};
75
77
  if (flags.target) params["profile"] = flags.target;
76
78
  if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
77
- if (flags.cursor) params["cursor"] = flags.cursor;
79
+ const cursor = readCursorFlag(flags, out);
80
+ if (cursor) params["cursor"] = cursor;
78
81
  try {
79
82
  if (all) {
80
83
  const fn = (p) => ns.groups.list(p);
@@ -116,11 +119,12 @@ async function runGroupMembers(client, flags, out) {
116
119
  const ns = client.account(accountId);
117
120
  const outOpts = resolveOutputOpts(flags);
118
121
  const all = flags.all ?? false;
119
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
122
+ const maxPages = readMaxPagesFlag(flags, out);
120
123
  const params = {};
121
124
  if (flags.name) params["name"] = flags.name;
122
125
  if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
123
- if (flags.cursor) params["cursor"] = flags.cursor;
126
+ const cursor = readCursorFlag(flags, out);
127
+ if (cursor) params["cursor"] = cursor;
124
128
  try {
125
129
  if (all) {
126
130
  const fn = (p) => ns.groups.members(groupId, p);
@@ -8,12 +8,14 @@ import {
8
8
  } from "./chunk-UEAX6KUB.js";
9
9
  import {
10
10
  requireAccount
11
- } from "./chunk-MNDXMGPX.js";
11
+ } from "./chunk-LD5KJSCT.js";
12
12
  import {
13
13
  buildPreviewOutput
14
14
  } from "./chunk-TCUYH5GO.js";
15
15
  import {
16
16
  pageDelayFromFlags,
17
+ readCursorFlag,
18
+ readMaxPagesFlag,
17
19
  readablePage,
18
20
  rejectPaginationModifiersWithoutAll,
19
21
  renderError,
@@ -22,7 +24,7 @@ import {
22
24
  resolveEffectiveConfig,
23
25
  streamAll,
24
26
  writeNdjsonItem
25
- } from "./chunk-7JU4IXXG.js";
27
+ } from "./chunk-OTBJATDE.js";
26
28
  import "./chunk-XZJQQJBE.js";
27
29
  import {
28
30
  createClient
@@ -60,10 +62,11 @@ function resolveOutputOpts(flags) {
60
62
  fields: flags.fields
61
63
  };
62
64
  }
63
- function buildPaginationParams(flags) {
65
+ function buildPaginationParams(flags, out) {
64
66
  const params = {};
65
67
  if (flags.limit !== void 0) params["limit"] = parseInt(flags.limit, 10);
66
- if (flags.cursor) params["cursor"] = flags.cursor;
68
+ const cursor = readCursorFlag(flags, out);
69
+ if (cursor) params["cursor"] = cursor;
67
70
  return params;
68
71
  }
69
72
  function validateIsoZTimestamp(value, flagName, out) {
@@ -112,8 +115,8 @@ async function runInboxList(client, flags, out) {
112
115
  const ns = client.account(accountId);
113
116
  const outOpts = resolveOutputOpts(flags);
114
117
  const all = flags.all ?? false;
115
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
116
- const params = buildPaginationParams(flags);
118
+ const maxPages = readMaxPagesFlag(flags, out);
119
+ const params = buildPaginationParams(flags, out);
117
120
  validateLimitRange(flags.limit, out);
118
121
  validateInboxFolder(flags.inbox, out);
119
122
  if (flags.unread !== void 0) {
@@ -193,8 +196,8 @@ async function runInboxMessages(client, flags, out) {
193
196
  const ns = client.account(accountId);
194
197
  const outOpts = resolveOutputOpts(flags);
195
198
  const all = flags.all ?? false;
196
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
197
- const params = { ...buildPaginationParams(flags), ...retrieval.query };
199
+ const maxPages = readMaxPagesFlag(flags, out);
200
+ const params = { ...buildPaginationParams(flags, out), ...retrieval.query };
198
201
  validateLimitRange(flags.limit, out);
199
202
  if (flags.before !== void 0) {
200
203
  validateIsoZTimestamp(flags.before, "before", out);
@@ -223,7 +226,7 @@ async function runInboxMessages(client, flags, out) {
223
226
  const { CurviateError } = await import("@curviate/sdk");
224
227
  if (err instanceof CurviateError && err.code === "NOT_STORED") {
225
228
  renderError(err, outOpts, out);
226
- const servable = flags.before === void 0 && flags.after === void 0 && flags.cursor === void 0;
229
+ const servable = flags.before === void 0 && flags.after === void 0 && readCursorFlag(flags, out) === void 0;
227
230
  if (servable) {
228
231
  out.stderr.write(
229
232
  "hint: a stored listing is served only after a walk of the whole chat, which any unfiltered page fetch restarts. Run `curviate inbox messages <chat_id> --all` without `--mode cache_only` to walk it to the end. A chat whose messages do not fit one page (`--limit`, at most 25) is not served from the store at all.\n"
@@ -253,8 +256,8 @@ async function runInboxSearch(client, flags, out) {
253
256
  const ns = client.account(accountId);
254
257
  const outOpts = resolveOutputOpts(flags);
255
258
  const all = flags.all ?? false;
256
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
257
- const params = { query, ...buildPaginationParams(flags) };
259
+ const maxPages = readMaxPagesFlag(flags, out);
260
+ const params = { query, ...buildPaginationParams(flags, out) };
258
261
  try {
259
262
  if (all) {
260
263
  const fn = (p) => ns.messaging.searchChats(p);
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-MNDXMGPX.js";
4
+ } from "./chunk-LD5KJSCT.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
+ readCursorFlag,
8
+ readMaxPagesFlag,
7
9
  readablePage,
8
10
  rejectPaginationModifiersWithoutAll,
9
11
  renderError,
@@ -12,7 +14,7 @@ import {
12
14
  resolveEffectiveConfig,
13
15
  streamAll,
14
16
  writeNdjsonItem
15
- } from "./chunk-7JU4IXXG.js";
17
+ } from "./chunk-OTBJATDE.js";
16
18
  import "./chunk-XZJQQJBE.js";
17
19
  import {
18
20
  createClient
@@ -94,11 +96,12 @@ async function runInboxesChats(client, flags, out) {
94
96
  const ns = client.account(accountId);
95
97
  const outOpts = resolveOutputOpts(flags);
96
98
  const all = flags.all ?? false;
97
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
99
+ const maxPages = readMaxPagesFlag(flags, out);
98
100
  validateLimitRange(flags.limit, out);
99
101
  const params = {};
100
102
  if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
101
- if (flags.cursor) params["cursor"] = flags.cursor;
103
+ const cursor = readCursorFlag(flags, out);
104
+ if (cursor) params["cursor"] = cursor;
102
105
  try {
103
106
  if (all) {
104
107
  const fn = (p) => ns.inboxes.listChats(inboxId, p);
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-UEAX6KUB.js";
12
12
  import {
13
13
  requireAccount
14
- } from "./chunk-MNDXMGPX.js";
14
+ } from "./chunk-LD5KJSCT.js";
15
15
  import {
16
16
  buildPreviewOutput
17
17
  } from "./chunk-TCUYH5GO.js";
@@ -19,6 +19,8 @@ import {
19
19
  DEFAULT_PAGE_DELAY_MS,
20
20
  ndjsonModeNotice,
21
21
  pageDelayFromFlags,
22
+ readCursorFlag,
23
+ readMaxPagesFlag,
22
24
  readablePage,
23
25
  rejectPaginationModifiersWithoutAll,
24
26
  renderError,
@@ -27,7 +29,7 @@ import {
27
29
  resolveEffectiveConfig,
28
30
  streamAll,
29
31
  writeNdjsonItem
30
- } from "./chunk-7JU4IXXG.js";
32
+ } from "./chunk-OTBJATDE.js";
31
33
  import "./chunk-XZJQQJBE.js";
32
34
  import {
33
35
  createClient,
@@ -149,7 +151,7 @@ async function runJobList(client, flags, out) {
149
151
  const ns = client.account(accountId);
150
152
  const outOpts = resolveOutputOpts(flags);
151
153
  const all = flags.all ?? false;
152
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
154
+ const maxPages = readMaxPagesFlag(flags, out);
153
155
  const pageDelayMs = pageDelayFromFlags(flags);
154
156
  if (state === "ALL") {
155
157
  await runJobListAllStates(ns, flags, out, outOpts, { all, maxPages, pageDelayMs });
@@ -158,7 +160,8 @@ async function runJobList(client, flags, out) {
158
160
  requireEnum(state, JOB_STATES, "--state", out);
159
161
  const base = { state };
160
162
  if (flags.limit) base.limit = parseInt(flags.limit, 10);
161
- if (flags.cursor) base.cursor = flags.cursor;
163
+ const cursor = readCursorFlag(flags, out);
164
+ if (cursor) base.cursor = cursor;
162
165
  try {
163
166
  if (all) {
164
167
  const fn = (p) => listJobs(ns, p).then((page) => {
@@ -272,7 +275,7 @@ async function runJobApplicants(client, flags, out) {
272
275
  const ns = client.account(accountId);
273
276
  const outOpts = resolveOutputOpts(flags);
274
277
  const all = flags.all ?? false;
275
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
278
+ const maxPages = readMaxPagesFlag(flags, out);
276
279
  const base = {};
277
280
  if (flags.ratings) {
278
281
  const ratings = flags.ratings.split(",").map((r) => r.trim()).filter(Boolean);
@@ -280,7 +283,8 @@ async function runJobApplicants(client, flags, out) {
280
283
  base.ratings = ratings;
281
284
  }
282
285
  if (flags.limit) base.limit = parseInt(flags.limit, 10);
283
- if (flags.cursor) base.cursor = flags.cursor;
286
+ const cursor = readCursorFlag(flags, out);
287
+ if (cursor) base.cursor = cursor;
284
288
  try {
285
289
  if (all) {
286
290
  const fn = (p) => ns.jobs.listApplicants(jobId, p);
@@ -13,14 +13,14 @@ import {
13
13
  runMessageSend,
14
14
  sentAsNotice,
15
15
  willSendAsNotice
16
- } from "./chunk-BN7L7WSY.js";
16
+ } from "./chunk-T6G5AASF.js";
17
17
  import "./chunk-UWO2D4HW.js";
18
18
  import "./chunk-HOQ7EUHJ.js";
19
19
  import "./chunk-BGZW6B7G.js";
20
20
  import "./chunk-UEAX6KUB.js";
21
- import "./chunk-MNDXMGPX.js";
21
+ import "./chunk-LD5KJSCT.js";
22
22
  import "./chunk-TCUYH5GO.js";
23
- import "./chunk-7JU4IXXG.js";
23
+ import "./chunk-OTBJATDE.js";
24
24
  import "./chunk-XZJQQJBE.js";
25
25
  import "./chunk-DCZR4M7G.js";
26
26
  import "./chunk-XDQHNUEU.js";
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-MNDXMGPX.js";
4
+ } from "./chunk-LD5KJSCT.js";
5
5
  import {
6
6
  buildPreviewOutput
7
7
  } from "./chunk-TCUYH5GO.js";
8
8
  import {
9
9
  pageDelayFromFlags,
10
+ readCursorFlag,
11
+ readMaxPagesFlag,
10
12
  readablePage,
11
13
  rejectPaginationModifiersWithoutAll,
12
14
  renderError,
@@ -15,7 +17,7 @@ import {
15
17
  resolveEffectiveConfig,
16
18
  streamAll,
17
19
  writeNdjsonItem
18
- } from "./chunk-7JU4IXXG.js";
20
+ } from "./chunk-OTBJATDE.js";
19
21
  import "./chunk-XZJQQJBE.js";
20
22
  import {
21
23
  createClient
@@ -64,11 +66,12 @@ async function runNotificationList(client, flags, out) {
64
66
  const ns = client.account(accountId);
65
67
  const outOpts = resolveOutputOpts(flags);
66
68
  const all = flags.all ?? false;
67
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
69
+ const maxPages = readMaxPagesFlag(flags, out);
68
70
  const params = {};
69
71
  if (flags.filter) params["filter"] = flags.filter;
70
72
  if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
71
- if (flags.cursor) params["cursor"] = flags.cursor;
73
+ const cursor = readCursorFlag(flags, out);
74
+ if (cursor) params["cursor"] = cursor;
72
75
  try {
73
76
  if (all) {
74
77
  const fn = (p) => ns.notifications.list(p);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveMemberOrMeProviderId
4
- } from "./chunk-ZJ7D3NFS.js";
4
+ } from "./chunk-BGVK73VI.js";
5
5
  import {
6
6
  AttachError,
7
7
  readAttachment,
@@ -10,12 +10,14 @@ import {
10
10
  import "./chunk-UEAX6KUB.js";
11
11
  import {
12
12
  requireAccount
13
- } from "./chunk-MNDXMGPX.js";
13
+ } from "./chunk-LD5KJSCT.js";
14
14
  import {
15
15
  buildPreviewOutput
16
16
  } from "./chunk-TCUYH5GO.js";
17
17
  import {
18
18
  pageDelayFromFlags,
19
+ readCursorFlag,
20
+ readMaxPagesFlag,
19
21
  readablePage,
20
22
  rejectPaginationModifiersWithoutAll,
21
23
  renderError,
@@ -24,7 +26,7 @@ import {
24
26
  resolveEffectiveConfig,
25
27
  streamAll,
26
28
  writeNdjsonItem
27
- } from "./chunk-7JU4IXXG.js";
29
+ } from "./chunk-OTBJATDE.js";
28
30
  import "./chunk-XZJQQJBE.js";
29
31
  import {
30
32
  createClient
@@ -65,10 +67,11 @@ function resolveOutputOpts(flags) {
65
67
  fields: flags.fields
66
68
  };
67
69
  }
68
- function buildPaginationParams(flags) {
70
+ function buildPaginationParams(flags, out) {
69
71
  const params = {};
70
72
  if (flags.limit !== void 0) params["limit"] = parseInt(flags.limit, 10);
71
- if (flags.cursor) params["cursor"] = flags.cursor;
73
+ const cursor = readCursorFlag(flags, out);
74
+ if (cursor) params["cursor"] = cursor;
72
75
  return params;
73
76
  }
74
77
  function normalizeAttachPaths(attach) {
@@ -188,8 +191,8 @@ async function runPostReactions(client, flags, out) {
188
191
  const ns = client.account(accountId);
189
192
  const outOpts = resolveOutputOpts(flags);
190
193
  const all = flags.all ?? false;
191
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
192
- const params = buildPaginationParams(flags);
194
+ const maxPages = readMaxPagesFlag(flags, out);
195
+ const params = buildPaginationParams(flags, out);
193
196
  try {
194
197
  if (all) {
195
198
  const fn = (p) => ns.posts.listReactions(postId, p);
@@ -216,8 +219,8 @@ async function runPostSaved(client, flags, out) {
216
219
  const ns = client.account(accountId);
217
220
  const outOpts = resolveOutputOpts(flags);
218
221
  const all = flags.all ?? false;
219
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
220
- const params = buildPaginationParams(flags);
222
+ const maxPages = readMaxPagesFlag(flags, out);
223
+ const params = buildPaginationParams(flags, out);
221
224
  try {
222
225
  if (all) {
223
226
  const fn = (p) => ns.posts.listSaved(p);
@@ -331,8 +334,8 @@ async function runPostUserPosts(client, flags, out) {
331
334
  return;
332
335
  }
333
336
  const all = flags.all ?? false;
334
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
335
- const params = buildPaginationParams(flags);
337
+ const maxPages = readMaxPagesFlag(flags, out);
338
+ const params = buildPaginationParams(flags, out);
336
339
  try {
337
340
  if (all) {
338
341
  const fn = (p) => ns.posts.listUserPosts(userId, p);
@@ -366,8 +369,8 @@ async function runPostUserReactions(client, flags, out) {
366
369
  return;
367
370
  }
368
371
  const all = flags.all ?? false;
369
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
370
- const params = buildPaginationParams(flags);
372
+ const maxPages = readMaxPagesFlag(flags, out);
373
+ const params = buildPaginationParams(flags, out);
371
374
  try {
372
375
  if (all) {
373
376
  const fn = (p) => ns.posts.listUserReactions(userId, p);
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  resolveMemberOrMeProviderId,
15
15
  resolveMemberProviderId
16
- } from "./chunk-ZJ7D3NFS.js";
16
+ } from "./chunk-BGVK73VI.js";
17
17
  import {
18
18
  AttachError,
19
19
  readAttachment,
@@ -24,12 +24,14 @@ import {
24
24
  } from "./chunk-UEAX6KUB.js";
25
25
  import {
26
26
  requireAccount
27
- } from "./chunk-MNDXMGPX.js";
27
+ } from "./chunk-LD5KJSCT.js";
28
28
  import {
29
29
  buildPreviewOutput
30
30
  } from "./chunk-TCUYH5GO.js";
31
31
  import {
32
32
  pageDelayFromFlags,
33
+ readCursorFlag,
34
+ readMaxPagesFlag,
33
35
  readableId,
34
36
  readablePage,
35
37
  rejectPaginationModifiersWithoutAll,
@@ -39,7 +41,7 @@ import {
39
41
  resolveEffectiveConfig,
40
42
  streamAll,
41
43
  writeNdjsonItem
42
- } from "./chunk-7JU4IXXG.js";
44
+ } from "./chunk-OTBJATDE.js";
43
45
  import "./chunk-XZJQQJBE.js";
44
46
  import {
45
47
  createClient
@@ -114,10 +116,11 @@ async function runProfileMe(client, flags, out) {
114
116
  const outOpts = resolveOutputOpts(flags);
115
117
  if (hasActivityFlag) {
116
118
  const all = flags.all ?? false;
117
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
119
+ const maxPages = readMaxPagesFlag(flags, out);
118
120
  const params2 = {};
119
121
  if (flags.limit) params2.limit = parseInt(flags.limit, 10);
120
- if (flags.cursor) params2.cursor = flags.cursor;
122
+ const cursor = readCursorFlag(flags, out);
123
+ if (cursor) params2.cursor = cursor;
121
124
  try {
122
125
  if (flags.posts) {
123
126
  if (all) {
@@ -244,9 +247,9 @@ async function runProfileGet(client, flags, out) {
244
247
  const ns = client.account(accountId);
245
248
  const outOpts = resolveOutputOpts(flags);
246
249
  const all = flags.all ?? false;
247
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
250
+ const maxPages = readMaxPagesFlag(flags, out);
248
251
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
249
- const cursor = flags.cursor;
252
+ const cursor = readCursorFlag(flags, out);
250
253
  try {
251
254
  if (flags.posts) {
252
255
  const params = {};
@@ -356,9 +359,9 @@ async function runProfileRelations(client, flags, out) {
356
359
  const ns = client.account(accountId);
357
360
  const outOpts = resolveOutputOpts(flags);
358
361
  const all = flags.all ?? false;
359
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
362
+ const maxPages = readMaxPagesFlag(flags, out);
360
363
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
361
- const cursor = flags.cursor;
364
+ const cursor = readCursorFlag(flags, out);
362
365
  const params = {};
363
366
  if (limit !== void 0) params.limit = limit;
364
367
  if (cursor) params.cursor = cursor;
@@ -460,9 +463,9 @@ async function runProfileVisitors(client, flags, out) {
460
463
  const ns = client.account(accountId);
461
464
  const outOpts = resolveOutputOpts(flags);
462
465
  const all = flags.all ?? false;
463
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
466
+ const maxPages = readMaxPagesFlag(flags, out);
464
467
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
465
- const cursor = flags.cursor;
468
+ const cursor = readCursorFlag(flags, out);
466
469
  const params = {};
467
470
  if (limit !== void 0) params.limit = limit;
468
471
  if (cursor) params.cursor = cursor;
@@ -600,10 +603,11 @@ async function runProfileFollowers(client, flags, out) {
600
603
  const ns = client.account(accountId);
601
604
  const outOpts = resolveOutputOpts(flags);
602
605
  const all = flags.all ?? false;
603
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
606
+ const maxPages = readMaxPagesFlag(flags, out);
604
607
  const params = {};
605
608
  if (flags.limit) params.limit = parseInt(flags.limit, 10);
606
- if (flags.cursor) params.cursor = flags.cursor;
609
+ const cursor = readCursorFlag(flags, out);
610
+ if (cursor) params.cursor = cursor;
607
611
  try {
608
612
  if (all) {
609
613
  const fn = (p) => ns.users.listFollowers(resolvedId, p);
@@ -631,10 +635,11 @@ async function runProfileFollowing(client, flags, out) {
631
635
  const ns = client.account(accountId);
632
636
  const outOpts = resolveOutputOpts(flags);
633
637
  const all = flags.all ?? false;
634
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
638
+ const maxPages = readMaxPagesFlag(flags, out);
635
639
  const params = {};
636
640
  if (flags.limit) params.limit = parseInt(flags.limit, 10);
637
- if (flags.cursor) params.cursor = flags.cursor;
641
+ const cursor = readCursorFlag(flags, out);
642
+ if (cursor) params.cursor = cursor;
638
643
  try {
639
644
  if (all) {
640
645
  const fn = (p) => ns.users.listFollowing(resolvedId, p);
@@ -22,12 +22,14 @@ import {
22
22
  } from "./chunk-UEAX6KUB.js";
23
23
  import {
24
24
  requireAccount
25
- } from "./chunk-MNDXMGPX.js";
25
+ } from "./chunk-LD5KJSCT.js";
26
26
  import {
27
27
  buildPreviewOutput
28
28
  } from "./chunk-TCUYH5GO.js";
29
29
  import {
30
30
  pageDelayFromFlags,
31
+ readCursorFlag,
32
+ readMaxPagesFlag,
31
33
  readablePage,
32
34
  rejectPaginationModifiersWithoutAll,
33
35
  renderError,
@@ -36,7 +38,7 @@ import {
36
38
  resolveEffectiveConfig,
37
39
  streamAll,
38
40
  writeNdjsonItem
39
- } from "./chunk-7JU4IXXG.js";
41
+ } from "./chunk-OTBJATDE.js";
40
42
  import "./chunk-XZJQQJBE.js";
41
43
  import {
42
44
  createClient,
@@ -274,9 +276,9 @@ async function runRecruiterSearchPeople(client, flags, out, readers = DEFAULT_FI
274
276
  const ns = client.account(accountId);
275
277
  const outOpts = resolveOutputOpts(flags);
276
278
  const all = flags.all ?? false;
277
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
279
+ const maxPages = readMaxPagesFlag(flags, out);
278
280
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
279
- const cursor = flags.cursor;
281
+ const cursor = readCursorFlag(flags, out);
280
282
  const assembled = await assembleFilters(flags, readers);
281
283
  if ("error" in assembled) {
282
284
  out.stderr.write(`error: ${assembled.error}
@@ -355,9 +357,9 @@ async function runRecruiterSearchFromUrl(client, flags, out) {
355
357
  const ns = client.account(accountId);
356
358
  const outOpts = resolveOutputOpts(flags);
357
359
  const all = flags.all ?? false;
358
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
360
+ const maxPages = readMaxPagesFlag(flags, out);
359
361
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
360
- const cursor = flags.cursor;
362
+ const cursor = readCursorFlag(flags, out);
361
363
  const body = { url };
362
364
  const params = {};
363
365
  if (limit !== void 0) params["limit"] = limit;
@@ -395,9 +397,9 @@ async function runRecruiterListProjects(client, flags, out) {
395
397
  const ns = client.account(accountId);
396
398
  const outOpts = resolveOutputOpts(flags);
397
399
  const all = flags.all ?? false;
398
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
400
+ const maxPages = readMaxPagesFlag(flags, out);
399
401
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
400
- const cursor = flags.cursor;
402
+ const cursor = readCursorFlag(flags, out);
401
403
  const params = {};
402
404
  if (limit !== void 0) params["limit"] = limit;
403
405
  if (cursor) params["cursor"] = cursor;
@@ -477,9 +479,9 @@ async function runRecruiterListPipeline(client, flags, out) {
477
479
  const ns = client.account(accountId);
478
480
  const outOpts = resolveOutputOpts(flags);
479
481
  const all = flags.all ?? false;
480
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
482
+ const maxPages = readMaxPagesFlag(flags, out);
481
483
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
482
- const cursor = flags.cursor;
484
+ const cursor = readCursorFlag(flags, out);
483
485
  const body = {};
484
486
  if (flags.keywords) body["keywords"] = flags.keywords;
485
487
  if (flags["stage-id"]) body["stage_id"] = flags["stage-id"];
@@ -578,9 +580,9 @@ async function runRecruiterListJobs(client, flags, out) {
578
580
  const ns = client.account(accountId);
579
581
  const outOpts = resolveOutputOpts(flags);
580
582
  const all = flags.all ?? false;
581
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
583
+ const maxPages = readMaxPagesFlag(flags, out);
582
584
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
583
- const cursor = flags.cursor;
585
+ const cursor = readCursorFlag(flags, out);
584
586
  const params = {};
585
587
  if (limit !== void 0) params["limit"] = limit;
586
588
  if (cursor) params["cursor"] = cursor;
@@ -788,9 +790,9 @@ async function runRecruiterSearchTalentPool(client, flags, out, readers = DEFAUL
788
790
  const ns = client.account(accountId);
789
791
  const outOpts = resolveOutputOpts(flags);
790
792
  const all = flags.all ?? false;
791
- const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
793
+ const maxPages = readMaxPagesFlag(flags, out);
792
794
  const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
793
- const cursor = flags.cursor;
795
+ const cursor = readCursorFlag(flags, out);
794
796
  const assembled = await assembleFilters(flags, readers);
795
797
  if ("error" in assembled) {
796
798
  out.stderr.write(`error: ${assembled.error}
@@ -842,7 +844,8 @@ async function runRecruiterListApplicants(client, flags, out) {
842
844
  const body = { channel_id: flags["channel-id"] };
843
845
  const params = {};
844
846
  if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
845
- if (flags.cursor) params["cursor"] = flags.cursor;
847
+ const cursor = readCursorFlag(flags, out);
848
+ if (cursor) params["cursor"] = cursor;
846
849
  try {
847
850
  const result = await ns.recruiter.listApplicants(projectId, body, Object.keys(params).length > 0 ? params : void 0);
848
851
  renderSuccess(result, outOpts, out);