@togglhq/cli 1.6.7 → 1.6.9
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/build/cli.js +1 -1
- package/build/index.js +1 -1
- package/build/{program-BKAby4-V.js → program-DdJCeZEU.js} +50 -34
- package/build/program.js +1 -1
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as CommanderError, t as createProgram } from "./program-
|
|
2
|
+
import { n as CommanderError, t as createProgram } from "./program-DdJCeZEU.js";
|
|
3
3
|
//#region src/cli.ts
|
|
4
4
|
try {
|
|
5
5
|
await createProgram({ enableUpdateNotification: true }).parseAsync(process.argv);
|
package/build/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createProgram } from "./program-
|
|
1
|
+
import { t as createProgram } from "./program-DdJCeZEU.js";
|
|
2
2
|
export { createProgram };
|
|
@@ -10616,7 +10616,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
|
|
|
10616
10616
|
]))
|
|
10617
10617
|
});
|
|
10618
10618
|
//#endregion
|
|
10619
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10619
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
|
|
10620
10620
|
async function getInvitations(httpClient, signal) {
|
|
10621
10621
|
return (await httpClient.get(`invitations`, { signal })).json();
|
|
10622
10622
|
}
|
|
@@ -10633,7 +10633,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
|
|
|
10633
10633
|
return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
|
|
10634
10634
|
}
|
|
10635
10635
|
//#endregion
|
|
10636
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10636
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/org/utils/requests.mjs
|
|
10637
10637
|
function buildSearchParams$1(params, flattenArrays = false) {
|
|
10638
10638
|
const searchParams = new URLSearchParams();
|
|
10639
10639
|
Object.entries(params).forEach(([key, value]) => {
|
|
@@ -10645,7 +10645,7 @@ function buildSearchParams$1(params, flattenArrays = false) {
|
|
|
10645
10645
|
return searchParams;
|
|
10646
10646
|
}
|
|
10647
10647
|
//#endregion
|
|
10648
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10648
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
|
|
10649
10649
|
async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
|
|
10650
10650
|
return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
|
|
10651
10651
|
}
|
|
@@ -10659,7 +10659,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
|
|
|
10659
10659
|
return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
|
|
10660
10660
|
}
|
|
10661
10661
|
//#endregion
|
|
10662
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10662
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
|
|
10663
10663
|
async function getWorkspaces(httpClient, organization_id, signal) {
|
|
10664
10664
|
return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
|
|
10665
10665
|
}
|
|
@@ -10679,7 +10679,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
|
|
|
10679
10679
|
});
|
|
10680
10680
|
const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
|
|
10681
10681
|
//#endregion
|
|
10682
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10682
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/shared-data/utils/requests.mjs
|
|
10683
10683
|
const META_SYMBOL = Symbol.for("querygen:response:meta");
|
|
10684
10684
|
function withResponseMeta(data, headers, status) {
|
|
10685
10685
|
if (!data) return data;
|
|
@@ -10706,7 +10706,7 @@ function buildSearchParams(params, flattenArrays = false) {
|
|
|
10706
10706
|
return searchParams;
|
|
10707
10707
|
}
|
|
10708
10708
|
//#endregion
|
|
10709
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10709
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/shared-data/public-holidays/requests.mjs
|
|
10710
10710
|
async function getPublicHolidays(httpClient, year, { country, organization_id } = {}, signal) {
|
|
10711
10711
|
const response = await httpClient.get(`shared_data/api/publicholidays/${year}`, {
|
|
10712
10712
|
signal,
|
|
@@ -10718,12 +10718,12 @@ async function getPublicHolidays(httpClient, year, { country, organization_id }
|
|
|
10718
10718
|
return withResponseMeta(await response.json(), response.headers, response.status);
|
|
10719
10719
|
}
|
|
10720
10720
|
//#endregion
|
|
10721
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10721
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
|
|
10722
10722
|
async function getStatus(httpClient, signal) {
|
|
10723
10723
|
return (await httpClient.get(`shared_data/api/status`, { signal })).json();
|
|
10724
10724
|
}
|
|
10725
10725
|
//#endregion
|
|
10726
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10726
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
|
|
10727
10727
|
async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
|
|
10728
10728
|
return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
|
|
10729
10729
|
signal,
|
|
@@ -10751,7 +10751,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
|
|
|
10751
10751
|
return response.json();
|
|
10752
10752
|
}
|
|
10753
10753
|
//#endregion
|
|
10754
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10754
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.158_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_40dc316be14f5f2ff6fb35dfc27251bb/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
|
|
10755
10755
|
async function getMyWorkingHours(httpClient, organization_id, signal) {
|
|
10756
10756
|
return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
|
|
10757
10757
|
}
|
|
@@ -12477,8 +12477,11 @@ async function runSkillSetup(options) {
|
|
|
12477
12477
|
});
|
|
12478
12478
|
}
|
|
12479
12479
|
//#endregion
|
|
12480
|
-
//#region ../operations/build/safety-
|
|
12480
|
+
//#region ../operations/build/safety-DUCLJgdI.js
|
|
12481
12481
|
const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
|
|
12482
|
+
const perPageField = (max) => /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ integer(), /* @__PURE__ */ minValue$1(1), /* @__PURE__ */ maxValue$1(max), /* @__PURE__ */ description$1(`Results per page (1-${max})`)));
|
|
12483
|
+
const perPageSchema = perPageField(100);
|
|
12484
|
+
const orgUserPerPageSchema = perPageField(200);
|
|
12482
12485
|
const DATE_FIELD_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2}))?$/;
|
|
12483
12486
|
const dateField = (description) => /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ regex(DATE_FIELD_RE, "must be YYYY-MM-DD or RFC3339 datetime (e.g. '2025-01-01' or '2025-01-01T00:00:00Z')"), /* @__PURE__ */ description$1(description));
|
|
12484
12487
|
const apiDateTimeString = /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoTimestamp());
|
|
@@ -12488,7 +12491,7 @@ const timeBlockListSchema = /* @__PURE__ */ object$2({
|
|
|
12488
12491
|
date_to: dateField("Range end — date-only (e.g. '2025-01-07') or RFC3339 datetime. Date-only is expanded to T23:59:59Z."),
|
|
12489
12492
|
task_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by task ID"))),
|
|
12490
12493
|
page: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Page number"))),
|
|
12491
|
-
per_page:
|
|
12494
|
+
per_page: perPageSchema
|
|
12492
12495
|
});
|
|
12493
12496
|
const timeEntryListSchema = /* @__PURE__ */ object$2({
|
|
12494
12497
|
date_from: dateField("Range start — date-only (e.g. '2025-01-01') or RFC3339 datetime. Date-only is expanded to T00:00:00Z."),
|
|
@@ -12497,7 +12500,7 @@ const timeEntryListSchema = /* @__PURE__ */ object$2({
|
|
|
12497
12500
|
time_block_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by time block ID"))),
|
|
12498
12501
|
type: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ picklist$1(["activity", "break"]), /* @__PURE__ */ description$1("Filter by entry type"))),
|
|
12499
12502
|
page: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Page number"))),
|
|
12500
|
-
per_page:
|
|
12503
|
+
per_page: perPageSchema
|
|
12501
12504
|
});
|
|
12502
12505
|
const timeEntryStartSchema = /* @__PURE__ */ object$2({
|
|
12503
12506
|
type: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ picklist$1(["activity", "break"]), /* @__PURE__ */ description$1("Entry type: 'activity' or 'break'. Defaults to 'activity' if omitted.")), "activity"),
|
|
@@ -12523,7 +12526,7 @@ const taskListSchema = /* @__PURE__ */ object$2({
|
|
|
12523
12526
|
end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("Filter tasks ending on or before this date (ISO 8601)"))),
|
|
12524
12527
|
parent_task_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by parent task ID"))),
|
|
12525
12528
|
page: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Page number"))),
|
|
12526
|
-
per_page:
|
|
12529
|
+
per_page: perPageSchema
|
|
12527
12530
|
});
|
|
12528
12531
|
const projectListSchema = /* @__PURE__ */ object$2({
|
|
12529
12532
|
name: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("Filter by project name (partial match)"))),
|
|
@@ -12531,15 +12534,15 @@ const projectListSchema = /* @__PURE__ */ object$2({
|
|
|
12531
12534
|
user_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by member user ID"))),
|
|
12532
12535
|
client_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by client ID"))),
|
|
12533
12536
|
page: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Page number"))),
|
|
12534
|
-
per_page:
|
|
12537
|
+
per_page: perPageSchema
|
|
12535
12538
|
});
|
|
12536
12539
|
const statusListSchema = /* @__PURE__ */ object$2({
|
|
12537
12540
|
page: optionalNumber,
|
|
12538
|
-
per_page:
|
|
12541
|
+
per_page: perPageSchema
|
|
12539
12542
|
});
|
|
12540
12543
|
const userListSchema = /* @__PURE__ */ object$2({
|
|
12541
12544
|
page: optionalNumber,
|
|
12542
|
-
per_page:
|
|
12545
|
+
per_page: orgUserPerPageSchema,
|
|
12543
12546
|
filter: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("Filter by name or email"))),
|
|
12544
12547
|
sort_dir: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("Sort direction (asc/desc)"))),
|
|
12545
12548
|
only_admins: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ boolean$1(), /* @__PURE__ */ description$1("Only return admins"))),
|
|
@@ -12557,7 +12560,16 @@ const userListSchema = /* @__PURE__ */ object$2({
|
|
|
12557
12560
|
const tagListSchema = /* @__PURE__ */ object$2({
|
|
12558
12561
|
name: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("Filter by tag name"))),
|
|
12559
12562
|
page: optionalNumber,
|
|
12560
|
-
per_page:
|
|
12563
|
+
per_page: perPageSchema
|
|
12564
|
+
});
|
|
12565
|
+
const searchToolSchema = /* @__PURE__ */ object$2({
|
|
12566
|
+
keyword: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ minLength$1(3), /* @__PURE__ */ description$1("Search term, min 3 characters")),
|
|
12567
|
+
per_group: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ integer(), /* @__PURE__ */ minValue$1(1), /* @__PURE__ */ maxValue$1(10), /* @__PURE__ */ description$1("Max results per group (1-10, default 5)"))),
|
|
12568
|
+
assignee_user_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ integer(), /* @__PURE__ */ description$1("Scope tasks to this assignee"))),
|
|
12569
|
+
project_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ integer(), /* @__PURE__ */ description$1("Scope time-entry and task suggestions to this project"))),
|
|
12570
|
+
task_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ integer(), /* @__PURE__ */ description$1("Scope time-entry (description) suggestions to this task"))),
|
|
12571
|
+
include_drafts: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ boolean$1(), /* @__PURE__ */ description$1("Include draft projects and tasks in the search results"))),
|
|
12572
|
+
exclude_calendar_events: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ boolean$1(), /* @__PURE__ */ description$1("Exclude external calendar-derived tasks and time entries")))
|
|
12561
12573
|
});
|
|
12562
12574
|
const tagIdSchema = /* @__PURE__ */ object$2({ tag_id: /* @__PURE__ */ number$2() });
|
|
12563
12575
|
const tagUpdateSchema = /* @__PURE__ */ object$2({
|
|
@@ -12567,7 +12579,7 @@ const tagUpdateSchema = /* @__PURE__ */ object$2({
|
|
|
12567
12579
|
const clientListSchema = /* @__PURE__ */ object$2({
|
|
12568
12580
|
name: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("Filter by client name"))),
|
|
12569
12581
|
page: optionalNumber,
|
|
12570
|
-
per_page:
|
|
12582
|
+
per_page: perPageSchema
|
|
12571
12583
|
});
|
|
12572
12584
|
const clientIdSchema = /* @__PURE__ */ object$2({ client_id: /* @__PURE__ */ number$2() });
|
|
12573
12585
|
const clientUpdateSchema = /* @__PURE__ */ object$2({
|
|
@@ -19435,18 +19447,10 @@ const generatedFocusOperations = [
|
|
|
19435
19447
|
cli: {
|
|
19436
19448
|
group: ["search"],
|
|
19437
19449
|
command: "search",
|
|
19438
|
-
interactive: "
|
|
19450
|
+
interactive: "available"
|
|
19439
19451
|
},
|
|
19440
19452
|
mcp: { entityTool: "search" },
|
|
19441
|
-
inputSchema:
|
|
19442
|
-
assignee_user_id: /* @__PURE__ */ number$2(),
|
|
19443
|
-
exclude_calendar_events: /* @__PURE__ */ unknown$1(),
|
|
19444
|
-
include_drafts: /* @__PURE__ */ unknown$1(),
|
|
19445
|
-
keyword: /* @__PURE__ */ unknown$1(),
|
|
19446
|
-
per_group: /* @__PURE__ */ unknown$1(),
|
|
19447
|
-
project_id: /* @__PURE__ */ number$2(),
|
|
19448
|
-
task_id: /* @__PURE__ */ number$2()
|
|
19449
|
-
}),
|
|
19453
|
+
inputSchema: searchToolSchema,
|
|
19450
19454
|
execute: (input, { client }) => {
|
|
19451
19455
|
const data = input;
|
|
19452
19456
|
return client.runGeneratedRequest("search", () => callGeneratedRequest(search, [
|
|
@@ -24427,7 +24431,19 @@ function parseJson(text, source) {
|
|
|
24427
24431
|
throw new Error(`Invalid JSON from ${source}: ${message}`, { cause: error });
|
|
24428
24432
|
}
|
|
24429
24433
|
}
|
|
24430
|
-
|
|
24434
|
+
const SCHEMA_WRAPPERS = new Set(["optional", "nullable"]);
|
|
24435
|
+
function schemaExpectsString(schema) {
|
|
24436
|
+
let current = schema;
|
|
24437
|
+
while (current && typeof current === "object" && "type" in current) {
|
|
24438
|
+
const { type, wrapped } = current;
|
|
24439
|
+
if (type === "string") return true;
|
|
24440
|
+
if (!type || !SCHEMA_WRAPPERS.has(type)) return false;
|
|
24441
|
+
current = wrapped;
|
|
24442
|
+
}
|
|
24443
|
+
return false;
|
|
24444
|
+
}
|
|
24445
|
+
function coerceScalarFlag(value, fieldSchema) {
|
|
24446
|
+
if (schemaExpectsString(fieldSchema)) return value;
|
|
24431
24447
|
if (value === "true") return true;
|
|
24432
24448
|
if (value === "false") return false;
|
|
24433
24449
|
const n = Number(value);
|
|
@@ -24455,7 +24471,7 @@ function inputFromScalarFlags(operation, options) {
|
|
|
24455
24471
|
for (const payloadKey of Object.keys(payloadShape)) {
|
|
24456
24472
|
const rawValue = options["payload" + payloadKey.replace(/(^|_)([a-z])/g, (_, _before, c) => c.toUpperCase())];
|
|
24457
24473
|
if (rawValue !== void 0) {
|
|
24458
|
-
payloadObj[payloadKey] = typeof rawValue === "string" ? coerceScalarFlag(rawValue) : rawValue;
|
|
24474
|
+
payloadObj[payloadKey] = typeof rawValue === "string" ? coerceScalarFlag(rawValue, payloadShape[payloadKey]) : rawValue;
|
|
24459
24475
|
hasPayload = true;
|
|
24460
24476
|
}
|
|
24461
24477
|
}
|
|
@@ -24468,7 +24484,7 @@ function inputFromScalarFlags(operation, options) {
|
|
|
24468
24484
|
}
|
|
24469
24485
|
const rawValue = options[toCamelCase(key)];
|
|
24470
24486
|
if (rawValue !== void 0) {
|
|
24471
|
-
result[key] = typeof rawValue === "string" ? coerceScalarFlag(rawValue) : rawValue;
|
|
24487
|
+
result[key] = typeof rawValue === "string" ? coerceScalarFlag(rawValue, fieldSchema) : rawValue;
|
|
24472
24488
|
hasAny = true;
|
|
24473
24489
|
}
|
|
24474
24490
|
}
|
|
@@ -24849,13 +24865,13 @@ function addScalarFlags(command, operation) {
|
|
|
24849
24865
|
if (payloadEntries) for (const [payloadKey, payloadFieldSchema] of Object.entries(payloadEntries)) {
|
|
24850
24866
|
const payloadFlagName = `payload-${payloadKey.replace(/_/g, "-")}`;
|
|
24851
24867
|
const pTypeSuffix = schemaFieldType(payloadFieldSchema) === "number" ? " <number>" : ` <${payloadKey}>`;
|
|
24852
|
-
command.option(`--${payloadFlagName}${pTypeSuffix}`, `Set payload.${payloadKey}`, (raw) => coerceScalarFlag(raw));
|
|
24868
|
+
command.option(`--${payloadFlagName}${pTypeSuffix}`, `Set payload.${payloadKey}`, (raw) => coerceScalarFlag(raw, payloadFieldSchema));
|
|
24853
24869
|
}
|
|
24854
24870
|
continue;
|
|
24855
24871
|
}
|
|
24856
24872
|
const flagName = key.replace(/_([a-z])/g, (_, c) => `-${c}`);
|
|
24857
24873
|
const typeSuffix = schemaFieldType(fieldSchema) === "number" ? " <number>" : ` <${key}>`;
|
|
24858
|
-
command.option(`--${flagName}${typeSuffix}`, `Set ${key}`, (raw) => coerceScalarFlag(raw));
|
|
24874
|
+
command.option(`--${flagName}${typeSuffix}`, `Set ${key}`, (raw) => coerceScalarFlag(raw, fieldSchema));
|
|
24859
24875
|
}
|
|
24860
24876
|
}
|
|
24861
24877
|
function groupCommand(program, group) {
|
|
@@ -25064,4 +25080,4 @@ Common commands:
|
|
|
25064
25080
|
//#endregion
|
|
25065
25081
|
export { CommanderError as n, createProgram as t };
|
|
25066
25082
|
|
|
25067
|
-
//# sourceMappingURL=program-
|
|
25083
|
+
//# sourceMappingURL=program-DdJCeZEU.js.map
|
package/build/program.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createProgram } from "./program-
|
|
1
|
+
import { t as createProgram } from "./program-DdJCeZEU.js";
|
|
2
2
|
export { createProgram };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@togglhq/cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.9",
|
|
4
4
|
"description": "Toggl CLI for Toggl 2.0 API operations.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@toggl/cli-core": "workspace:^",
|
|
57
57
|
"@toggl/operations": "workspace:^",
|
|
58
|
-
"@toggl/queries": "2.1.
|
|
58
|
+
"@toggl/queries": "2.1.158",
|
|
59
59
|
"@types/node": "22.19.11",
|
|
60
60
|
"tsdown": "0.21.8",
|
|
61
61
|
"typescript": "5.9.3",
|