@staff0rd/assist 0.291.0 → 0.291.1
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/index.js +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.291.
|
|
9
|
+
version: "0.291.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -15855,12 +15855,16 @@ function filterToSql(filter) {
|
|
|
15855
15855
|
}
|
|
15856
15856
|
|
|
15857
15857
|
// src/commands/seq/fetchSeqData.ts
|
|
15858
|
-
|
|
15858
|
+
function buildDataParams(filter, count6, from, to) {
|
|
15859
15859
|
const sqlFilter = filterToSql(filter);
|
|
15860
15860
|
const sql4 = `select @Timestamp, @Level, @Exception, @Message from stream where ${sqlFilter} order by @Timestamp desc limit ${count6}`;
|
|
15861
15861
|
const params = new URLSearchParams({ q: sql4 });
|
|
15862
|
-
if (from) params.set("
|
|
15863
|
-
if (to) params.set("
|
|
15862
|
+
if (from) params.set("rangeStartUtc", from);
|
|
15863
|
+
if (to) params.set("rangeEndUtc", to);
|
|
15864
|
+
return params;
|
|
15865
|
+
}
|
|
15866
|
+
async function fetchSeqData(conn, filter, count6, from, to) {
|
|
15867
|
+
const params = buildDataParams(filter, count6, from, to);
|
|
15864
15868
|
const response = await fetchSeq(conn, "/api/data", params);
|
|
15865
15869
|
const data = await response.json();
|
|
15866
15870
|
return mapDataToEvents(data);
|