@helm-ai/cli 1.2.0 → 1.3.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.
- package/dist/cli.js +19 -3
- 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 = "1.
|
|
28
|
+
var version = "1.3.0";
|
|
29
29
|
|
|
30
30
|
// src/commands/auth.ts
|
|
31
31
|
import prompts from "prompts";
|
|
@@ -3476,7 +3476,10 @@ function registerCalendarCommands(parent) {
|
|
|
3476
3476
|
return;
|
|
3477
3477
|
}
|
|
3478
3478
|
});
|
|
3479
|
-
cmd.command("create").description("Create a calendar event").requiredOption("-t, --title <title>").requiredOption("--start <date>", "ISO 8601 start time").requiredOption("--end <date>", "ISO 8601 end time").option("-d, --description <text>").option("--location <text>").option("--all-day").option("--meet", "auto-create Google Meet link").option("--zoom <url>", "attach a Zoom URL").option("--project <id>").option("--company <id>").option("
|
|
3479
|
+
cmd.command("create").description("Create a calendar event").requiredOption("-t, --title <title>").requiredOption("--start <date>", "ISO 8601 start time").requiredOption("--end <date>", "ISO 8601 end time").option("-d, --description <text>").option("--location <text>").option("--all-day").option("--meet", "auto-create Google Meet link").option("--zoom <url>", "attach a Zoom URL").option("--project <id>").option("--company <id>").option("--timezone <iana>", "IANA zone, e.g. America/Los_Angeles: --start/--end without an offset are read as wall-clock time there, and a repeating event keeps that local time across daylight saving (default: UTC)").option(
|
|
3480
|
+
"--repeat <rule>",
|
|
3481
|
+
"repeat it: daily, weekly, monthly or yearly (from the start date), or an RRULE line such as 'FREQ=WEEKLY;BYDAY=MO,WE;COUNT=10'. Needs Google Calendar connected"
|
|
3482
|
+
).option("-p, --profile <name>").action(async (opts) => {
|
|
3480
3483
|
try {
|
|
3481
3484
|
const client = HelmClient.fromProfile(resolveProfile(opts.profile));
|
|
3482
3485
|
const event = await client.calendar.create({
|
|
@@ -3489,7 +3492,9 @@ function registerCalendarCommands(parent) {
|
|
|
3489
3492
|
conference_provider: opts.meet ? "google_meet" : opts.zoom ? "zoom" : void 0,
|
|
3490
3493
|
conference_url: opts.zoom,
|
|
3491
3494
|
project_id: opts.project,
|
|
3492
|
-
company_id: opts.company
|
|
3495
|
+
company_id: opts.company,
|
|
3496
|
+
timezone: opts.timezone,
|
|
3497
|
+
recurrence: repeatRule(opts.repeat)
|
|
3493
3498
|
});
|
|
3494
3499
|
console.log(JSON.stringify(event, null, 2));
|
|
3495
3500
|
} catch (err) {
|
|
@@ -3510,6 +3515,17 @@ function registerCalendarCommands(parent) {
|
|
|
3510
3515
|
}
|
|
3511
3516
|
});
|
|
3512
3517
|
}
|
|
3518
|
+
function repeatRule(value) {
|
|
3519
|
+
if (!value) return void 0;
|
|
3520
|
+
const word = value.trim().toLowerCase();
|
|
3521
|
+
const presets = {
|
|
3522
|
+
daily: "RRULE:FREQ=DAILY",
|
|
3523
|
+
weekly: "RRULE:FREQ=WEEKLY",
|
|
3524
|
+
monthly: "RRULE:FREQ=MONTHLY",
|
|
3525
|
+
yearly: "RRULE:FREQ=YEARLY"
|
|
3526
|
+
};
|
|
3527
|
+
return presets[word] ?? value.trim();
|
|
3528
|
+
}
|
|
3513
3529
|
|
|
3514
3530
|
// src/commands/doc.ts
|
|
3515
3531
|
import { InvalidArgumentError as InvalidArgumentError3 } from "commander";
|