semanticdb-core 1.0.32 → 1.0.33

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.
@@ -122,11 +122,14 @@ function getMinGran(date, flag = false) {
122
122
  if (date.$options === 'DTD') {
123
123
  return 'day';
124
124
  }
125
+ const checkLTEValid = (lte, tw) => {
126
+ return (0, moment_1.default)(lte).isSame((0, moment_1.default)(lte).endOf(tw));
127
+ };
125
128
  for (const tw of exports.grans) {
126
- if (tw && tw in date.$options) {
129
+ if (tw && tw in date.$options && checkLTEValid(date.$lte, tw)) {
127
130
  return tw;
128
131
  }
129
- if (tw === 'isoWeek' && 'week' in date.$options) {
132
+ if (tw === 'isoWeek' && 'week' in date.$options && checkLTEValid(date.$lte, tw)) {
130
133
  return tw;
131
134
  }
132
135
  }
@@ -21,7 +21,7 @@ export interface SchemaTypeDraft {
21
21
  drilldown_blacklist?: string[];
22
22
  };
23
23
  drilldown?: GroupbyItemType[];
24
- projections?: string[];
24
+ projections?: any[];
25
25
  etl?: any;
26
26
  }
27
27
  export interface SchemaType extends SchemaTypeDraft {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semanticdb-core",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [