@helm-ai/cli 0.31.0 → 0.31.2
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/dist/cli.js +12 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ function renderSplash(ctx) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// src/version.ts
|
|
28
|
-
var version = "0.31.
|
|
28
|
+
var version = "0.31.2";
|
|
29
29
|
|
|
30
30
|
// src/commands/auth.ts
|
|
31
31
|
import prompts from "prompts";
|
|
@@ -2046,7 +2046,7 @@ function registerTaskCommands(parent) {
|
|
|
2046
2046
|
return;
|
|
2047
2047
|
}
|
|
2048
2048
|
});
|
|
2049
|
-
cmd.command("update <id>").description("Update a task").option("-t, --title <title>").option("-d, --description <text>").option("-s, --status <status>").option("--priority <level>").option("--due <date>", "ISO 8601 date").option("--parent <id>", 'parent task ID or visible_id (use "none" to detach)').option("-a, --assignee <id...>").option("--as <agent>", "make the change as
|
|
2049
|
+
cmd.command("update <id>").description("Update a task").option("-t, --title <title>").option("-d, --description <text>").option("-s, --status <status>").option("--priority <level>").option("--due <date>", "ISO 8601 date").option("--parent <id>", 'parent task ID or visible_id (use "none" to detach)').option("-a, --assignee <id...>").option("--as <agent>", "make the change as an agent on the task's project (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, opts) => {
|
|
2050
2050
|
try {
|
|
2051
2051
|
const client = HelmClient.fromProfile(resolveProfile(opts.profile));
|
|
2052
2052
|
const task = await client.tasks.update(id, {
|
|
@@ -2064,7 +2064,7 @@ function registerTaskCommands(parent) {
|
|
|
2064
2064
|
return;
|
|
2065
2065
|
}
|
|
2066
2066
|
});
|
|
2067
|
-
cmd.command("complete <id>").description("Mark a task as completed").option("--as <agent>", "complete it as
|
|
2067
|
+
cmd.command("complete <id>").description("Mark a task as completed").option("--as <agent>", "complete it as an agent on the task's project (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, opts) => {
|
|
2068
2068
|
try {
|
|
2069
2069
|
const client = HelmClient.fromProfile(resolveProfile(opts.profile));
|
|
2070
2070
|
await client.tasks.update(id, { status: "completed" }, opts.as);
|
|
@@ -2105,7 +2105,7 @@ Showing ${result.returned} of ${result.total}. Use --offset to page.`);
|
|
|
2105
2105
|
return;
|
|
2106
2106
|
}
|
|
2107
2107
|
});
|
|
2108
|
-
cmd.command("comment <id> <content>").description("Add a comment to a task").option("--attach <path...>", "file(s) to attach (repeatable, any type, max 25MB each)").option("--as <agent>", "post it as
|
|
2108
|
+
cmd.command("comment <id> <content>").description("Add a comment to a task").option("--attach <path...>", "file(s) to attach (repeatable, any type, max 25MB each)").option("--as <agent>", "post it as an agent on the task's project (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, content, opts) => {
|
|
2109
2109
|
try {
|
|
2110
2110
|
const client = HelmClient.fromProfile(resolveProfile(opts.profile));
|
|
2111
2111
|
const attachments = opts.attach ? await uploadAttachments(client, opts.attach) : void 0;
|
|
@@ -2736,12 +2736,12 @@ function recurring(r) {
|
|
|
2736
2736
|
if (n > 1) return `${base}/${n}${INTERVAL_SHORT[r.billing_interval] ?? r.billing_interval}`;
|
|
2737
2737
|
return `${base}/${INTERVAL_SHORT[r.billing_interval] ?? r.billing_interval}`;
|
|
2738
2738
|
}
|
|
2739
|
-
function printLink(
|
|
2739
|
+
function printLink(result) {
|
|
2740
2740
|
console.log("Send this link to the customer:");
|
|
2741
|
-
console.log(
|
|
2741
|
+
console.log(result.link_url ?? result.checkout_url);
|
|
2742
2742
|
console.log(
|
|
2743
2743
|
`
|
|
2744
|
-
It shows as awaiting payment until they pay` + (
|
|
2744
|
+
It shows as awaiting payment until they pay` + (result.link_url ? ", and stays valid until then or until you cancel it." : result.expires_at ? `, and expires ${new Date(result.expires_at).toLocaleString()}.` : ".") + `
|
|
2745
2745
|
See waiting links with: helm-ai subscription links`
|
|
2746
2746
|
);
|
|
2747
2747
|
}
|
|
@@ -2815,7 +2815,7 @@ function registerSubscriptionCommands(parent) {
|
|
|
2815
2815
|
method: opts.checkout ? "checkout" : "auto"
|
|
2816
2816
|
});
|
|
2817
2817
|
if (result.method === "checkout") {
|
|
2818
|
-
printLink(result
|
|
2818
|
+
printLink(result);
|
|
2819
2819
|
} else {
|
|
2820
2820
|
console.log(`\u2713 Subscription started (${result.subscription.stripe_subscription_id})`);
|
|
2821
2821
|
}
|
|
@@ -2840,8 +2840,9 @@ function registerSubscriptionCommands(parent) {
|
|
|
2840
2840
|
{ header: "Product", get: (r) => r.product_name ?? (r.product_id ? "" : "(removed)"), truncate: 24 },
|
|
2841
2841
|
{ header: "Amount", get: (r) => recurring(r) },
|
|
2842
2842
|
{ header: "Sent", get: (r) => r.created_at.slice(0, 10) },
|
|
2843
|
-
|
|
2844
|
-
{ header: "
|
|
2843
|
+
// A Helm link never expires; only one sent straight to Stripe does.
|
|
2844
|
+
{ header: "Expires (UTC)", get: (r) => r.public_token ? "never" : r.expires_at?.replace("T", " ").slice(0, 16) ?? "" },
|
|
2845
|
+
{ header: "Link", get: (r) => r.link_url ?? r.checkout_url, truncate: 40 },
|
|
2845
2846
|
{ header: "ID", get: (r) => r.id, truncate: 8 }
|
|
2846
2847
|
], opts.output ?? defaultFormat()));
|
|
2847
2848
|
} catch (err) {
|
|
@@ -2863,7 +2864,7 @@ function registerSubscriptionCommands(parent) {
|
|
|
2863
2864
|
try {
|
|
2864
2865
|
const client = HelmClient.fromProfile(resolveProfile(opts.profile));
|
|
2865
2866
|
const result = await client.subscriptions.renewLink(id);
|
|
2866
|
-
if (result.method === "checkout") printLink(result
|
|
2867
|
+
if (result.method === "checkout") printLink(result);
|
|
2867
2868
|
} catch (err) {
|
|
2868
2869
|
console.error(formatErrorForCli(err));
|
|
2869
2870
|
process.exitCode = 1;
|