@lotics/cli 0.292.0 → 0.292.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/src/cli.js +89 -45
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -27654,25 +27654,12 @@ function customAlphabet(alphabet, size2 = 21) {
|
|
|
27654
27654
|
return customRandom(alphabet, size2, random);
|
|
27655
27655
|
}
|
|
27656
27656
|
|
|
27657
|
-
// ../shared/src/add_operator.ts
|
|
27658
|
-
function addOrConcat(left, right, addNumbers) {
|
|
27659
|
-
if (typeof left === "string" || typeof right === "string") {
|
|
27660
|
-
return String(left ?? "") + String(right ?? "");
|
|
27661
|
-
}
|
|
27662
|
-
return addNumbers();
|
|
27663
|
-
}
|
|
27664
|
-
|
|
27665
|
-
// ../shared/src/utils.ts
|
|
27666
|
-
function sample(arr) {
|
|
27667
|
-
if (arr.length === 0) return void 0;
|
|
27668
|
-
return arr[Math.floor(Math.random() * arr.length)];
|
|
27669
|
-
}
|
|
27670
|
-
|
|
27671
27657
|
// ../shared/src/expression_limits.ts
|
|
27672
27658
|
var MAX_RESULT_LENGTH = 1e5;
|
|
27673
27659
|
var MAX_STRING_LENGTH = 1e7;
|
|
27674
27660
|
var MAX_RANDOM_LENGTH = 1e3;
|
|
27675
27661
|
var MAX_RUN_BUILT_BYTES = 512 * 1024 * 1024;
|
|
27662
|
+
var MAX_IN_PLACE_BYTES = 1024 * 1024;
|
|
27676
27663
|
var MAX_PERSISTED_JSON_LENGTH = 64 * 1024 * 1024;
|
|
27677
27664
|
var ExpressionLimitError = class extends Error {
|
|
27678
27665
|
constructor(message2) {
|
|
@@ -27752,21 +27739,68 @@ function escapedLength(text) {
|
|
|
27752
27739
|
function isLowSurrogate(code) {
|
|
27753
27740
|
return code >= 56320 && code <= 57343;
|
|
27754
27741
|
}
|
|
27742
|
+
function textOf(value) {
|
|
27743
|
+
if (!Array.isArray(value)) return ownText(value);
|
|
27744
|
+
const parts = [];
|
|
27745
|
+
walkJoined(value, (text) => {
|
|
27746
|
+
parts.push(text);
|
|
27747
|
+
return true;
|
|
27748
|
+
});
|
|
27749
|
+
return parts.join("");
|
|
27750
|
+
}
|
|
27755
27751
|
function textLengthUpTo(value, max2) {
|
|
27756
|
-
|
|
27757
|
-
|
|
27758
|
-
|
|
27759
|
-
|
|
27760
|
-
|
|
27761
|
-
|
|
27762
|
-
let length2 = Math.max(0, value.length - 1);
|
|
27763
|
-
for (let index = 0; index < value.length && length2 <= max2; index++) {
|
|
27764
|
-
const element = value[index];
|
|
27765
|
-
if (element != null) length2 += textLength(element, max2 - length2, joining);
|
|
27766
|
-
}
|
|
27767
|
-
joining.delete(value);
|
|
27752
|
+
if (!Array.isArray(value)) return ownText(value).length;
|
|
27753
|
+
let length2 = 0;
|
|
27754
|
+
walkJoined(value, (text) => {
|
|
27755
|
+
length2 += text.length;
|
|
27756
|
+
return length2 <= max2;
|
|
27757
|
+
});
|
|
27768
27758
|
return length2;
|
|
27769
27759
|
}
|
|
27760
|
+
function ownText(value) {
|
|
27761
|
+
if (typeof value === "string") return value;
|
|
27762
|
+
if (value instanceof Date) return Date.prototype.toString.call(value);
|
|
27763
|
+
if (typeof value === "object" && value !== null) return Object.prototype.toString.call(value);
|
|
27764
|
+
return String(value);
|
|
27765
|
+
}
|
|
27766
|
+
function walkJoined(array2, write) {
|
|
27767
|
+
const joining = /* @__PURE__ */ new Set([array2]);
|
|
27768
|
+
const stack = [{ array: array2, at: 0 }];
|
|
27769
|
+
while (stack.length > 0) {
|
|
27770
|
+
const frame = stack[stack.length - 1];
|
|
27771
|
+
if (frame.at >= frame.array.length) {
|
|
27772
|
+
joining.delete(frame.array);
|
|
27773
|
+
stack.pop();
|
|
27774
|
+
continue;
|
|
27775
|
+
}
|
|
27776
|
+
if (frame.at > 0 && !write(",")) return;
|
|
27777
|
+
const element = frame.array[frame.at];
|
|
27778
|
+
frame.at += 1;
|
|
27779
|
+
if (element === null || element === void 0) continue;
|
|
27780
|
+
if (Array.isArray(element)) {
|
|
27781
|
+
if (!joining.has(element)) {
|
|
27782
|
+
joining.add(element);
|
|
27783
|
+
stack.push({ array: element, at: 0 });
|
|
27784
|
+
}
|
|
27785
|
+
continue;
|
|
27786
|
+
}
|
|
27787
|
+
if (!write(ownText(element))) return;
|
|
27788
|
+
}
|
|
27789
|
+
}
|
|
27790
|
+
|
|
27791
|
+
// ../shared/src/add_operator.ts
|
|
27792
|
+
function addOrConcat(left, right, addNumbers) {
|
|
27793
|
+
if (typeof left === "string" || typeof right === "string") {
|
|
27794
|
+
return textOf(left ?? "") + textOf(right ?? "");
|
|
27795
|
+
}
|
|
27796
|
+
return addNumbers();
|
|
27797
|
+
}
|
|
27798
|
+
|
|
27799
|
+
// ../shared/src/utils.ts
|
|
27800
|
+
function sample(arr) {
|
|
27801
|
+
if (arr.length === 0) return void 0;
|
|
27802
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
27803
|
+
}
|
|
27770
27804
|
|
|
27771
27805
|
// ../shared/src/expression_array.ts
|
|
27772
27806
|
var expression_array_exports = {};
|
|
@@ -27805,6 +27839,16 @@ __export(expression_array_exports, {
|
|
|
27805
27839
|
unique: () => unique,
|
|
27806
27840
|
uniqueBy: () => uniqueBy
|
|
27807
27841
|
});
|
|
27842
|
+
|
|
27843
|
+
// ../shared/src/own_property.ts
|
|
27844
|
+
function ownMember(value, key) {
|
|
27845
|
+
return Object.hasOwn(value, key) ? Reflect.get(value, key) : void 0;
|
|
27846
|
+
}
|
|
27847
|
+
function defineOwn(target, key, value) {
|
|
27848
|
+
Object.defineProperty(target, key, { value, writable: true, enumerable: true, configurable: true });
|
|
27849
|
+
}
|
|
27850
|
+
|
|
27851
|
+
// ../shared/src/expression_array.ts
|
|
27808
27852
|
function getField(obj, field) {
|
|
27809
27853
|
if (obj == null) return void 0;
|
|
27810
27854
|
const parts = field.split(".");
|
|
@@ -27812,10 +27856,17 @@ function getField(obj, field) {
|
|
|
27812
27856
|
for (const part of parts) {
|
|
27813
27857
|
if (value == null) return void 0;
|
|
27814
27858
|
if (typeof value !== "object") return void 0;
|
|
27815
|
-
value = value
|
|
27859
|
+
value = ownMember(value, part);
|
|
27816
27860
|
}
|
|
27817
27861
|
return value;
|
|
27818
27862
|
}
|
|
27863
|
+
function countInto(result, key) {
|
|
27864
|
+
defineOwn(result, key, (Object.hasOwn(result, key) ? result[key] : 0) + 1);
|
|
27865
|
+
}
|
|
27866
|
+
function groupInto(result, key, item) {
|
|
27867
|
+
if (Object.hasOwn(result, key)) result[key].push(item);
|
|
27868
|
+
else defineOwn(result, key, [item]);
|
|
27869
|
+
}
|
|
27819
27870
|
function compareValues(a, b) {
|
|
27820
27871
|
if (a == null && b == null) return 0;
|
|
27821
27872
|
if (a == null) return 1;
|
|
@@ -27977,7 +28028,7 @@ function countBy(arr, fieldOrCb) {
|
|
|
27977
28028
|
const result2 = {};
|
|
27978
28029
|
for (const val of keys2) {
|
|
27979
28030
|
const key = val == null ? "null" : String(val);
|
|
27980
|
-
result2
|
|
28031
|
+
countInto(result2, key);
|
|
27981
28032
|
}
|
|
27982
28033
|
return result2;
|
|
27983
28034
|
});
|
|
@@ -27990,7 +28041,7 @@ function countBy(arr, fieldOrCb) {
|
|
|
27990
28041
|
for (const item of arr) {
|
|
27991
28042
|
const val = getField(item, field);
|
|
27992
28043
|
const key = val == null ? "null" : String(val);
|
|
27993
|
-
result
|
|
28044
|
+
countInto(result, key);
|
|
27994
28045
|
}
|
|
27995
28046
|
return result;
|
|
27996
28047
|
}
|
|
@@ -28110,7 +28161,7 @@ function groupBy(arr, fieldOrCb) {
|
|
|
28110
28161
|
const result2 = {};
|
|
28111
28162
|
for (let i = 0; i < arr.length; i++) {
|
|
28112
28163
|
const key = keys2[i] == null ? "null" : String(keys2[i]);
|
|
28113
|
-
(result2
|
|
28164
|
+
groupInto(result2, key, arr[i]);
|
|
28114
28165
|
}
|
|
28115
28166
|
return result2;
|
|
28116
28167
|
});
|
|
@@ -28123,10 +28174,7 @@ function groupBy(arr, fieldOrCb) {
|
|
|
28123
28174
|
for (const item of arr) {
|
|
28124
28175
|
const val = getField(item, field);
|
|
28125
28176
|
const key = val == null ? "null" : String(val);
|
|
28126
|
-
|
|
28127
|
-
result[key] = [];
|
|
28128
|
-
}
|
|
28129
|
-
result[key].push(item);
|
|
28177
|
+
groupInto(result, key, item);
|
|
28130
28178
|
}
|
|
28131
28179
|
return result;
|
|
28132
28180
|
}
|
|
@@ -29060,7 +29108,7 @@ function getNestedValue(obj, path17) {
|
|
|
29060
29108
|
for (const part of parts) {
|
|
29061
29109
|
if (value == null) return void 0;
|
|
29062
29110
|
if (typeof value !== "object") return void 0;
|
|
29063
|
-
value = value
|
|
29111
|
+
value = ownMember(value, part);
|
|
29064
29112
|
}
|
|
29065
29113
|
return value;
|
|
29066
29114
|
}
|
|
@@ -29116,9 +29164,7 @@ function pick2(obj, fields) {
|
|
|
29116
29164
|
const objRecord = obj;
|
|
29117
29165
|
for (const field of fields) {
|
|
29118
29166
|
const fieldStr = String(field);
|
|
29119
|
-
if (fieldStr
|
|
29120
|
-
result[fieldStr] = objRecord[fieldStr];
|
|
29121
|
-
}
|
|
29167
|
+
if (Object.hasOwn(objRecord, fieldStr)) defineOwn(result, fieldStr, objRecord[fieldStr]);
|
|
29122
29168
|
}
|
|
29123
29169
|
return result;
|
|
29124
29170
|
}
|
|
@@ -29136,10 +29182,8 @@ function omit2(obj, fields) {
|
|
|
29136
29182
|
const result = {};
|
|
29137
29183
|
const objRecord = obj;
|
|
29138
29184
|
const fieldsSet = new Set(fields.map(String));
|
|
29139
|
-
for (const key
|
|
29140
|
-
if (!fieldsSet.has(key))
|
|
29141
|
-
result[key] = objRecord[key];
|
|
29142
|
-
}
|
|
29185
|
+
for (const key of Object.keys(objRecord)) {
|
|
29186
|
+
if (!fieldsSet.has(key)) defineOwn(result, key, objRecord[key]);
|
|
29143
29187
|
}
|
|
29144
29188
|
return result;
|
|
29145
29189
|
}
|
|
@@ -29251,7 +29295,7 @@ function toString(val) {
|
|
|
29251
29295
|
if (typeof val !== "string" && textLengthUpTo(val, MAX_STRING_LENGTH) > MAX_STRING_LENGTH) {
|
|
29252
29296
|
throw new ExpressionLimitError(`toString: result too long (max ${MAX_STRING_LENGTH} characters)`);
|
|
29253
29297
|
}
|
|
29254
|
-
return
|
|
29298
|
+
return textOf(val);
|
|
29255
29299
|
}
|
|
29256
29300
|
function isNull(val) {
|
|
29257
29301
|
return val === null || val === void 0;
|
|
@@ -42295,8 +42339,8 @@ function resultSideEffects(result) {
|
|
|
42295
42339
|
}
|
|
42296
42340
|
|
|
42297
42341
|
// src/version.ts
|
|
42298
|
-
var VERSION = "0.292.
|
|
42299
|
-
var APP_SDK_VERSION = "0.115.
|
|
42342
|
+
var VERSION = "0.292.2";
|
|
42343
|
+
var APP_SDK_VERSION = "0.115.3";
|
|
42300
42344
|
|
|
42301
42345
|
// src/timezone.ts
|
|
42302
42346
|
function machineTimezone() {
|