zinkee 0.1.21 → 0.1.22
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/.claude/settings.local.json +2 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/displays.ts +5 -2
- package/src/utils/examples.ts +3 -3
package/package.json
CHANGED
package/src/commands/displays.ts
CHANGED
|
@@ -17,6 +17,9 @@ import type { RuntimeOverrides } from "../types.js";
|
|
|
17
17
|
import { CliError } from "../utils/errors.js";
|
|
18
18
|
import { buildJsonSuccess, printTable } from "../utils/output.js";
|
|
19
19
|
|
|
20
|
+
const DATE_DYNAMIC_OPTIONS =
|
|
21
|
+
"today, thisWeek, thisMonth, thisQuarter, thisSemester, thisYear, next7Days, next30Days, next6Months, next12Months, last12Months";
|
|
22
|
+
|
|
20
23
|
interface CommandIo {
|
|
21
24
|
write(chunk: string): unknown;
|
|
22
25
|
}
|
|
@@ -674,7 +677,7 @@ export function registerDisplaysCommands(
|
|
|
674
677
|
.option("--type <type>").option("--name <name>").option("--allow-multiple").option("--static")
|
|
675
678
|
.option("--default <value>").option("--default-value <value>", "repeatable default value", (v, p: string[] = []) => [...p, v], [])
|
|
676
679
|
.option("--source-schema <id>").option("--source-field <id>").option("--filter <expr>", "repeatable filter", collectFilters, [])
|
|
677
|
-
.option("--date-mode <mode>").option("--date-dynamic-option <option>").option("--date-specific <iso>").option("--date-range-start <iso>").option("--date-range-end <iso>")
|
|
680
|
+
.option("--date-mode <mode>").option("--date-dynamic-option <option>", `dynamic date period (${DATE_DYNAMIC_OPTIONS})`).option("--date-specific <iso>").option("--date-range-start <iso>").option("--date-range-end <iso>")
|
|
678
681
|
.option("--raw <json>").option("--raw-file <path>")
|
|
679
682
|
.action(async function action(this: Command, display: NormalizedUuidOrSlug, commandOptions: VariableMutationOptions) {
|
|
680
683
|
const { api, json, readOnly } = createDisplaysApi(this, filePath); ensureWritable("displays variables create", readOnly, "write");
|
|
@@ -686,7 +689,7 @@ export function registerDisplaysCommands(
|
|
|
686
689
|
.option("--type <type>").option("--name <name>").option("--allow-multiple").option("--static")
|
|
687
690
|
.option("--default <value>").option("--default-value <value>", "repeatable default value", (v, p: string[] = []) => [...p, v], [])
|
|
688
691
|
.option("--source-schema <id>").option("--source-field <id>").option("--filter <expr>", "repeatable filter", collectFilters, [])
|
|
689
|
-
.option("--date-mode <mode>").option("--date-dynamic-option <option>").option("--date-specific <iso>").option("--date-range-start <iso>").option("--date-range-end <iso>")
|
|
692
|
+
.option("--date-mode <mode>").option("--date-dynamic-option <option>", `dynamic date period (${DATE_DYNAMIC_OPTIONS})`).option("--date-specific <iso>").option("--date-range-start <iso>").option("--date-range-end <iso>")
|
|
690
693
|
.option("--raw <json>").option("--raw-file <path>")
|
|
691
694
|
.action(async function action(this: Command, display: NormalizedUuidOrSlug, variableId: string, commandOptions: VariableMutationOptions) {
|
|
692
695
|
const { api, json, readOnly } = createDisplaysApi(this, filePath); ensureWritable("displays variables update", readOnly, "write");
|
package/src/utils/examples.ts
CHANGED
|
@@ -1298,13 +1298,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
|
|
|
1298
1298
|
}`,
|
|
1299
1299
|
},
|
|
1300
1300
|
{
|
|
1301
|
-
description: "Change a DATE variable to use
|
|
1301
|
+
description: "Change a DATE variable to use last12Months.",
|
|
1302
1302
|
command:
|
|
1303
|
-
'zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 bbbbbbbb-2222-4222-a222-222222222222 --date-mode dynamic --date-dynamic-option
|
|
1303
|
+
'zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 bbbbbbbb-2222-4222-a222-222222222222 --date-mode dynamic --date-dynamic-option last12Months',
|
|
1304
1304
|
raw: `{
|
|
1305
1305
|
"date": {
|
|
1306
1306
|
"mode": "dynamic",
|
|
1307
|
-
"dynamicOption": "
|
|
1307
|
+
"dynamicOption": "last12Months"
|
|
1308
1308
|
}
|
|
1309
1309
|
}`,
|
|
1310
1310
|
},
|