@curviate/cli 0.46.0 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,24 @@ a new command or flag is a minor; a breaking command/flag/exit-code change is a
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.46.1] - 2026-10-04
|
|
12
|
+
|
|
13
|
+
Requires `@curviate/sdk` 0.41.0.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **`account link --account-id` refuses an empty or blank value.** `--account-id ""`
|
|
18
|
+
(for instance `--account-id "$ACC"` with `ACC` unset) used to open a NEW connect,
|
|
19
|
+
and `--account-id " "` sent a reconnect with a blank id. Both now exit 2 before
|
|
20
|
+
any request, and the message says to pass an `acc_...` id or omit the flag.
|
|
21
|
+
- **A blank `<account_id>` positional is refused.** `account get|update|disconnect`
|
|
22
|
+
and `account checkpoint solve|poll|request` with an empty or whitespace-only id
|
|
23
|
+
used to send it to the server (`/v1/accounts/%20%20`, or `account_id: " "` in a
|
|
24
|
+
body). They now exit 2 before any request.
|
|
25
|
+
- **`webhook update --account-ids ""` is refused.** It was silently dropped, so the
|
|
26
|
+
update went through without the change. An empty or blank list now exits 2 before
|
|
27
|
+
any request, as `webhook create` already did.
|
|
28
|
+
|
|
11
29
|
## [0.46.0] - 2026-10-03
|
|
12
30
|
|
|
13
31
|
Requires `@curviate/sdk` 0.41.0.
|
|
@@ -237,9 +237,19 @@ async function runAccountList(client, flags, out) {
|
|
|
237
237
|
await handleError(err, outOpts, out);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
+
function requireAccountId(flags, out) {
|
|
241
|
+
const id = flags["account-id"];
|
|
242
|
+
if (id === void 0 || id.trim() === "") {
|
|
243
|
+
out.stderr.write(
|
|
244
|
+
"error: account_id is required and was missing or blank. Pass an acc_... id (`curviate account list`; for a checkpoint, the provisional account_id from the 202 response).\n"
|
|
245
|
+
);
|
|
246
|
+
process.exit(2);
|
|
247
|
+
}
|
|
248
|
+
return id;
|
|
249
|
+
}
|
|
240
250
|
async function runAccountGet(client, flags, out) {
|
|
241
251
|
rejectAllOnNonPaginated(flags.all, out);
|
|
242
|
-
const accountId = flags
|
|
252
|
+
const accountId = requireAccountId(flags, out);
|
|
243
253
|
const outOpts = resolveOutputOpts(flags);
|
|
244
254
|
try {
|
|
245
255
|
const result = await client.accounts.get(accountId);
|
|
@@ -619,6 +629,12 @@ async function runAccountLink(client, flags, out, io = {}) {
|
|
|
619
629
|
out.stderr.write("error: --auth-method is required for account link (credentials | cookie).\n");
|
|
620
630
|
process.exit(2);
|
|
621
631
|
}
|
|
632
|
+
if (flags["account-id"] !== void 0 && flags["account-id"].trim() === "") {
|
|
633
|
+
out.stderr.write(
|
|
634
|
+
"error: --account-id was given an empty value. Pass the acc_... id of the account to reconnect (`curviate account list`), or omit the flag entirely to connect a new account.\n"
|
|
635
|
+
);
|
|
636
|
+
process.exit(2);
|
|
637
|
+
}
|
|
622
638
|
checkCredentialConflicts(flags, out);
|
|
623
639
|
if (!flags.preview && flags["auth-method"] === "cookie" && !flags["user-agent"]) {
|
|
624
640
|
out.stderr.write(
|
|
@@ -785,7 +801,7 @@ async function runAccountConnectSessionPoll(client, flags, out, io = {}) {
|
|
|
785
801
|
process.exit(AUTH_NEEDED);
|
|
786
802
|
}
|
|
787
803
|
async function runAccountUpdate(client, flags, out) {
|
|
788
|
-
const accountId = flags
|
|
804
|
+
const accountId = requireAccountId(flags, out);
|
|
789
805
|
const body = {};
|
|
790
806
|
if (flags.metadata !== void 0) {
|
|
791
807
|
let parsed;
|
|
@@ -850,7 +866,7 @@ async function runAccountUpdate(client, flags, out) {
|
|
|
850
866
|
}
|
|
851
867
|
}
|
|
852
868
|
async function runAccountDisconnect(client, flags, out) {
|
|
853
|
-
const accountId = flags
|
|
869
|
+
const accountId = requireAccountId(flags, out);
|
|
854
870
|
const outOpts = resolveOutputOpts(flags);
|
|
855
871
|
if (flags.preview) {
|
|
856
872
|
const preview = buildPreviewOutput({
|
|
@@ -869,15 +885,11 @@ async function runAccountDisconnect(client, flags, out) {
|
|
|
869
885
|
}
|
|
870
886
|
}
|
|
871
887
|
async function runAccountCheckpointSolve(client, flags, out) {
|
|
872
|
-
if (!flags["account-id"]) {
|
|
873
|
-
out.stderr.write("error: account_id is required (the provisional account_id from the 202 response).\n");
|
|
874
|
-
process.exit(2);
|
|
875
|
-
}
|
|
876
888
|
if (!flags.code) {
|
|
877
889
|
out.stderr.write("error: --code is required (the OTP / 2FA code).\n");
|
|
878
890
|
process.exit(2);
|
|
879
891
|
}
|
|
880
|
-
const accountId = flags
|
|
892
|
+
const accountId = requireAccountId(flags, out);
|
|
881
893
|
const body = { code: flags.code };
|
|
882
894
|
const outOpts = resolveOutputOpts(flags);
|
|
883
895
|
if (flags.preview) {
|
|
@@ -905,11 +917,7 @@ async function runAccountCheckpointSolve(client, flags, out) {
|
|
|
905
917
|
}
|
|
906
918
|
}
|
|
907
919
|
async function runAccountCheckpointRequest(client, flags, out) {
|
|
908
|
-
|
|
909
|
-
out.stderr.write("error: account_id is required (the provisional account_id from the 202 response).\n");
|
|
910
|
-
process.exit(2);
|
|
911
|
-
}
|
|
912
|
-
const accountId = flags["account-id"] ?? "";
|
|
920
|
+
const accountId = requireAccountId(flags, out);
|
|
913
921
|
const outOpts = resolveOutputOpts(flags);
|
|
914
922
|
const body = flags.challenge !== void 0 ? { challenge: flags.challenge } : void 0;
|
|
915
923
|
if (flags.preview) {
|
|
@@ -963,11 +971,7 @@ async function runCheckpointPollWaitLoop(client, accountId, ctx) {
|
|
|
963
971
|
}
|
|
964
972
|
}
|
|
965
973
|
async function runAccountCheckpointPoll(client, flags, out, io = {}) {
|
|
966
|
-
|
|
967
|
-
out.stderr.write("error: account_id is required (the provisional account_id from the 202 response).\n");
|
|
968
|
-
process.exit(2);
|
|
969
|
-
}
|
|
970
|
-
const accountId = flags["account-id"] ?? "";
|
|
974
|
+
const accountId = requireAccountId(flags, out);
|
|
971
975
|
const outOpts = resolveOutputOpts(flags);
|
|
972
976
|
if (flags.preview) {
|
|
973
977
|
const preview = buildPreviewOutput({
|
package/dist/cli.js
CHANGED
|
@@ -44,8 +44,8 @@ var main = defineCommand({
|
|
|
44
44
|
message: () => import("./message-WCBNBPAJ.js").then((m) => m.messageCommand),
|
|
45
45
|
post: () => import("./post-OQWJRL4B.js").then((m) => m.postCommand),
|
|
46
46
|
comment: () => import("./comment-BKGVJYS2.js").then((m) => m.commentCommand),
|
|
47
|
-
account: () => import("./account-
|
|
48
|
-
webhook: () => import("./webhook-
|
|
47
|
+
account: () => import("./account-O5UX5UAH.js").then((m) => m.accountCommand),
|
|
48
|
+
webhook: () => import("./webhook-5M47UX6U.js").then((m) => m.webhookCommand),
|
|
49
49
|
"sales-nav": () => import("./sales-nav-WV3YHYD6.js").then((m) => m.salesNavCommand),
|
|
50
50
|
recruiter: () => import("./recruiter-ZKWG6QG3.js").then((m) => m.recruiterCommand),
|
|
51
51
|
group: () => import("./group-HFF7LDDQ.js").then((m) => m.groupCommand),
|
|
@@ -176,8 +176,13 @@ async function runWebhookUpdate(client, flags, out) {
|
|
|
176
176
|
if (flags.data) {
|
|
177
177
|
body["data"] = flags.data.split(",").map((s) => s.trim()).filter(Boolean);
|
|
178
178
|
}
|
|
179
|
-
if (flags["account-ids"]) {
|
|
180
|
-
|
|
179
|
+
if (flags["account-ids"] !== void 0) {
|
|
180
|
+
const accountIds = flags["account-ids"].split(",").map((s) => s.trim()).filter(Boolean);
|
|
181
|
+
if (accountIds.length === 0) {
|
|
182
|
+
out.stderr.write("error: --account-ids was given an empty value. Pass acc_... ids, or omit the flag to leave the targets unchanged.\n");
|
|
183
|
+
process.exit(2);
|
|
184
|
+
}
|
|
185
|
+
body["account_ids"] = accountIds;
|
|
181
186
|
}
|
|
182
187
|
const outOpts = resolveOutputOpts(flags);
|
|
183
188
|
if (flags.preview) {
|