@lotics/cli 0.236.1 → 0.237.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/src/cli.js +22 -5
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -52,7 +52,7 @@ var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__
|
|
|
52
52
|
var define_LOTICS_KIT_VERSIONS_default;
|
|
53
53
|
var init_define_LOTICS_KIT_VERSIONS = __esm({
|
|
54
54
|
"<define:__LOTICS_KIT_VERSIONS__>"() {
|
|
55
|
-
define_LOTICS_KIT_VERSIONS_default = { runtime: "0.27.
|
|
55
|
+
define_LOTICS_KIT_VERSIONS_default = { runtime: "0.27.2" };
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
|
|
@@ -41565,6 +41565,21 @@ var FILES_OPS = tableRecordFilesFieldFilterSchema.shape.operator.options;
|
|
|
41565
41565
|
var LOCKED_OPS = tableRecordLockedFilterSchema.shape.operator.options;
|
|
41566
41566
|
var CURRENT_MEMBER_OPS = tableRecordCurrentMemberFilterSchema.shape.operator.options;
|
|
41567
41567
|
var RECORD_ID_OPS = tableRecordRecordIdFilterSchema.shape.operator.options;
|
|
41568
|
+
var INSTANT_DATE_OPERATORS = /* @__PURE__ */ new Set([
|
|
41569
|
+
"on",
|
|
41570
|
+
"before",
|
|
41571
|
+
"after",
|
|
41572
|
+
"on_or_before",
|
|
41573
|
+
"on_or_after",
|
|
41574
|
+
"between",
|
|
41575
|
+
"time_of_day"
|
|
41576
|
+
]);
|
|
41577
|
+
function isRangeDateFormat(format2) {
|
|
41578
|
+
return format2 === "date_range" || format2 === "datetime_range";
|
|
41579
|
+
}
|
|
41580
|
+
function instantOnRangeRefusal(fieldKey, operator) {
|
|
41581
|
+
return `Filter on "${fieldKey}": '${operator}' compares a date, and this field holds a date range \u2014 no filter compares a range that way.`;
|
|
41582
|
+
}
|
|
41568
41583
|
var VALID_OPERATORS = {
|
|
41569
41584
|
text: TEXT_OPS,
|
|
41570
41585
|
number: NUMBER_OPS,
|
|
@@ -55524,7 +55539,7 @@ function resultSideEffects(result) {
|
|
|
55524
55539
|
|
|
55525
55540
|
// src/version.ts
|
|
55526
55541
|
init_define_LOTICS_KIT_VERSIONS();
|
|
55527
|
-
var VERSION = "0.
|
|
55542
|
+
var VERSION = "0.237.0";
|
|
55528
55543
|
|
|
55529
55544
|
// src/timezone.ts
|
|
55530
55545
|
init_define_LOTICS_KIT_VERSIONS();
|
|
@@ -59635,8 +59650,7 @@ function combineDateTime(dateStr, timeStr) {
|
|
|
59635
59650
|
}
|
|
59636
59651
|
function isInTimeRange(dateTimeValue, startTime, endTime) {
|
|
59637
59652
|
const parsed2 = parseDate2(dateTimeValue);
|
|
59638
|
-
|
|
59639
|
-
const recordTimeMinutes = timeToMinutes(parsed2.hour, parsed2.minute);
|
|
59653
|
+
const recordTimeMinutes = timeToMinutes(parsed2.hour ?? 0, parsed2.minute ?? 0);
|
|
59640
59654
|
if (startTime && endTime) {
|
|
59641
59655
|
const startTimeMinutes = timeStringToMinutes(startTime);
|
|
59642
59656
|
const endTimeMinutes = timeStringToMinutes(endTime);
|
|
@@ -85391,8 +85405,11 @@ function matchCell(cell, field, filterCondition, looseCondition, memberContext)
|
|
|
85391
85405
|
const value = columnValue;
|
|
85392
85406
|
const fieldFormat = field.type === "date" ? field.format : "date";
|
|
85393
85407
|
const isDatetimeField = fieldFormat === "datetime" || fieldFormat === "datetime_range";
|
|
85394
|
-
const isRangeField = fieldFormat
|
|
85408
|
+
const isRangeField = isRangeDateFormat(fieldFormat);
|
|
85395
85409
|
const fieldTimezone = field.type === "date" ? field.timezone : void 0;
|
|
85410
|
+
if (isRangeField && INSTANT_DATE_OPERATORS.has(filterCondition.operator)) {
|
|
85411
|
+
throw new Error(instantOnRangeRefusal(filterCondition.field_key ?? "", filterCondition.operator));
|
|
85412
|
+
}
|
|
85396
85413
|
if (filterCondition.operator === "is_empty") {
|
|
85397
85414
|
matches = !value;
|
|
85398
85415
|
} else if (filterCondition.operator === "is_not_empty") {
|