@bitcobblers/wod-wiki-wql 0.7.37 → 0.7.38

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.cjs CHANGED
@@ -234,11 +234,14 @@ function parseWqlSuffixes(raw) {
234
234
 
235
235
  // src/wql.ts
236
236
  function isFindQuery(parsed) {
237
- return "target" in parsed;
237
+ return parsed.family === "find";
238
238
  }
239
239
  function isRowsQuery(parsed) {
240
240
  return parsed.family === "rows";
241
241
  }
242
+ function isAggregateQuery(parsed) {
243
+ return parsed.family === "aggregate";
244
+ }
242
245
  var AGGS = WQL_AGGREGATORS;
243
246
  function cannotParse(text) {
244
247
  return `Cannot parse "${text}". Expected agg:metric{filters} by {dims} .rollup(period)`;
@@ -373,6 +376,7 @@ function parseAnalyticsQuery(raw) {
373
376
  const suffixes = parseWqlSuffixes(raw);
374
377
  const { where: whereText, displayUnit, groupBy, rollup, primaryText: text } = suffixes;
375
378
  const base = {
379
+ family: "aggregate",
376
380
  raw,
377
381
  agg: "sum",
378
382
  metric: "",
@@ -440,6 +444,7 @@ function parseFindQuery(raw) {
440
444
  const suffixes = parseWqlSuffixes(raw);
441
445
  const { where: whereText, last, scope, primaryText: text } = suffixes;
442
446
  const result = {
447
+ family: "find",
443
448
  raw,
444
449
  target: "",
445
450
  filters: [],
@@ -1298,7 +1303,7 @@ var QueryService = class {
1298
1303
  const parsed = parseQuery(raw);
1299
1304
  if (isFindQuery(parsed)) {
1300
1305
  return {
1301
- parsed: { raw, agg: "count", metric: parsed.target, filters: [], groupBy: [] },
1306
+ parsed: { family: "aggregate", raw, agg: "count", metric: parsed.target, filters: [], groupBy: [] },
1302
1307
  series: [],
1303
1308
  stages: { selected: 0, buckets: 0, aggregated: 0, groups: 0 },
1304
1309
  matched: []
@@ -1306,7 +1311,7 @@ var QueryService = class {
1306
1311
  }
1307
1312
  if (isRowsQuery(parsed)) {
1308
1313
  return {
1309
- parsed: { raw, agg: "count", metric: "rows", filters: [], groupBy: [] },
1314
+ parsed: { family: "aggregate", raw, agg: "count", metric: "rows", filters: [], groupBy: [] },
1310
1315
  series: [],
1311
1316
  stages: { selected: 0, buckets: 0, aggregated: 0, groups: 0 },
1312
1317
  matched: []
@@ -1628,6 +1633,7 @@ var QueryService = class {
1628
1633
  };
1629
1634
  const join = parsed.join;
1630
1635
  const findResult = await this.runFind({
1636
+ family: "find",
1631
1637
  raw: "",
1632
1638
  target: join.target,
1633
1639
  filters: join.filters,
@@ -2046,13 +2052,13 @@ sum:$metric{} rollup:1w
2046
2052
  }
2047
2053
 
2048
2054
  // src/version.ts
2049
- var VERSION = "0.7.37";
2050
- var GIT_SHA = "713c593";
2051
- var BUILD_TIME = "2026-08-25T00:18:25.714Z";
2055
+ var VERSION = "0.7.38";
2056
+ var GIT_SHA = "172cc75";
2057
+ var BUILD_TIME = "2026-08-25T23:00:14.937Z";
2052
2058
  var SEMVER = {
2053
- version: "0.7.37",
2054
- gitSha: "713c593",
2055
- buildTime: "2026-08-25T00:18:25.714Z"
2059
+ version: "0.7.38",
2060
+ gitSha: "172cc75",
2061
+ buildTime: "2026-08-25T23:00:14.937Z"
2056
2062
  };
2057
2063
 
2058
2064
  exports.BUILD_TIME = BUILD_TIME;
@@ -2095,6 +2101,7 @@ exports.extractFrontmatterTags = extractFrontmatterTags;
2095
2101
  exports.getList = getList;
2096
2102
  exports.getScalar = getScalar;
2097
2103
  exports.getUnitFamily = getUnitFamily;
2104
+ exports.isAggregateQuery = isAggregateQuery;
2098
2105
  exports.isDashboardMeta = isDashboardMeta;
2099
2106
  exports.isDashboardWidgetType = isDashboardWidgetType;
2100
2107
  exports.isEffortDiscipline = isEffortDiscipline;