@gooddata/sdk-maql-language-server 0.0.0-stage → 11.65.0-alpha.4
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/LICENSE +7 -0
- package/README.md +118 -2
- package/esm/completions/complete.d.ts +12 -0
- package/esm/completions/complete.d.ts.map +1 -0
- package/esm/completions/complete.js +316 -0
- package/esm/completions/descriptions.d.ts +42 -0
- package/esm/completions/descriptions.d.ts.map +1 -0
- package/esm/completions/descriptions.js +290 -0
- package/esm/completions/findContext.d.ts +19 -0
- package/esm/completions/findContext.d.ts.map +1 -0
- package/esm/completions/findContext.js +172 -0
- package/esm/completions/functionDescriptions.d.ts +3 -0
- package/esm/completions/functionDescriptions.d.ts.map +1 -0
- package/esm/completions/functionDescriptions.js +99 -0
- package/esm/completions/sort.d.ts +4 -0
- package/esm/completions/sort.d.ts.map +1 -0
- package/esm/completions/sort.js +88 -0
- package/esm/constants.d.ts +21 -0
- package/esm/constants.d.ts.map +1 -0
- package/esm/constants.js +22 -0
- package/esm/dateElementFormat.d.ts +9 -0
- package/esm/dateElementFormat.d.ts.map +1 -0
- package/esm/dateElementFormat.js +60 -0
- package/esm/decorations.d.ts +39 -0
- package/esm/decorations.d.ts.map +1 -0
- package/esm/decorations.js +42 -0
- package/esm/diagnostics.d.ts +12 -0
- package/esm/diagnostics.d.ts.map +1 -0
- package/esm/diagnostics.js +260 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/approximate_count.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/approximate_count.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/approximate_count.js +61 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/avg.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/avg.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/avg.js +19 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/count.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/count.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/count.js +72 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/first.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/first.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/first.js +41 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/last.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/last.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/last.js +69 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/max.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/max.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/max.js +61 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/median.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/median.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/median.js +25 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/min.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/min.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/min.js +63 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/sum.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/sum.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/aggregation/sum.js +20 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/case.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/case.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/case.js +73 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/if-then-else.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/if-then-else.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/if-then-else.js +29 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/ifnull.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/ifnull.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/conditionals/ifnull.js +96 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-ranking-filters.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-ranking-filters.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-ranking-filters.js +71 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-having-clause.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-having-clause.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-having-clause.js +65 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-like-clause.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-like-clause.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-like-clause.js +36 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-where-clause.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-where-clause.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-where-clause.js +36 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions-except-for-attribute.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions-except-for-attribute.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions-except-for-attribute.js +21 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions.js +27 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all.js +64 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-attribute-all-in-all-other-dimensions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-attribute-all-in-all-other-dimensions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-attribute-all-in-all-other-dimensions.js +22 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by.js +85 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-except.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-except.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-except.js +37 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-filter.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-filter.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-filter.js +42 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-except.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-except.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-except.js +94 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-filter.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-filter.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-filter.js +33 -0
- package/esm/docs/en/docs/create-metrics/maql/for-each.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/for-each.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/for-each.js +17 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/and.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/and.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/and.js +37 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/not.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/not.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/not.js +12 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/or.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/or.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/logical-operators/or.js +22 -0
- package/esm/docs/en/docs/create-metrics/maql/maql-and-multidimensionality.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/maql-and-multidimensionality.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/maql-and-multidimensionality.js +59 -0
- package/esm/docs/en/docs/create-metrics/maql/math/abs.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/abs.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/abs.js +23 -0
- package/esm/docs/en/docs/create-metrics/maql/math/arithmetic-operations.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/arithmetic-operations.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/arithmetic-operations.js +29 -0
- package/esm/docs/en/docs/create-metrics/maql/math/ceiling.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/ceiling.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/ceiling.js +21 -0
- package/esm/docs/en/docs/create-metrics/maql/math/exp.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/exp.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/exp.js +27 -0
- package/esm/docs/en/docs/create-metrics/maql/math/floor.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/floor.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/floor.js +21 -0
- package/esm/docs/en/docs/create-metrics/maql/math/greatest.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/greatest.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/greatest.js +13 -0
- package/esm/docs/en/docs/create-metrics/maql/math/least.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/least.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/least.js +13 -0
- package/esm/docs/en/docs/create-metrics/maql/math/ln.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/ln.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/ln.js +33 -0
- package/esm/docs/en/docs/create-metrics/maql/math/log.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/log.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/log.js +29 -0
- package/esm/docs/en/docs/create-metrics/maql/math/power.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/power.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/power.js +33 -0
- package/esm/docs/en/docs/create-metrics/maql/math/round.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/round.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/round.js +34 -0
- package/esm/docs/en/docs/create-metrics/maql/math/sign.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/sign.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/sign.js +30 -0
- package/esm/docs/en/docs/create-metrics/maql/math/sqrt.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/sqrt.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/sqrt.js +32 -0
- package/esm/docs/en/docs/create-metrics/maql/math/trunc.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/math/trunc.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/math/trunc.js +36 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/percentile.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/percentile.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/percentile.js +57 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/rank-variations.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/rank-variations.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/rank-variations.js +90 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-in.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-in.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-in.js +53 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-of.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-of.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-of.js +29 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/within-clause.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/within-clause.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/ranking/within-clause.js +101 -0
- package/esm/docs/en/docs/create-metrics/maql/relational-operators.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/relational-operators.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/relational-operators.js +50 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/rolling-window.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/rolling-window.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/rolling-window.js +71 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-total-statistical-functions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-total-statistical-functions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-total-statistical-functions.js +54 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-totals-for-core-functions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-totals-for-core-functions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-totals-for-core-functions.js +37 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/correl.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/correl.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/correl.js +47 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/covariance-functions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/covariance-functions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/covariance-functions.js +46 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/forecast.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/forecast.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/forecast.js +74 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/least-squares-functions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/least-squares-functions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/least-squares-functions.js +44 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/standard-deviation-functions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/standard-deviation-functions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/standard-deviation-functions.js +88 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/variance-functions.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/variance-functions.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/statistic/variance-functions.js +54 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-each.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-each.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-each.js +96 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-next-period.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-next-period.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-next-period.js +38 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-next.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-next.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-next.js +27 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-previous-period.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-previous-period.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-previous-period.js +26 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-previous.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-previous.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time/for-previous.js +30 -0
- package/esm/docs/en/docs/create-metrics/maql/time/functions-for-referring-to-past-time-periods.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time/functions-for-referring-to-past-time-periods.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time/functions-for-referring-to-past-time-periods.js +36 -0
- package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-add.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-add.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-add.js +53 -0
- package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-diff.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-diff.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-diff.js +55 -0
- package/esm/docs/en/docs/create-metrics/maql/time-macros.d.ts +2 -0
- package/esm/docs/en/docs/create-metrics/maql/time-macros.d.ts.map +1 -0
- package/esm/docs/en/docs/create-metrics/maql/time-macros.js +79 -0
- package/esm/docs/index.d.ts +77 -0
- package/esm/docs/index.d.ts.map +1 -0
- package/esm/docs/index.js +141 -0
- package/esm/findObjects.d.ts +13 -0
- package/esm/findObjects.d.ts.map +1 -0
- package/esm/findObjects.js +72 -0
- package/esm/format.d.ts +4 -0
- package/esm/format.d.ts.map +1 -0
- package/esm/format.js +581 -0
- package/esm/highlight/convert.d.ts +3 -0
- package/esm/highlight/convert.d.ts.map +1 -0
- package/esm/highlight/convert.js +12 -0
- package/esm/highlight/semanticsHighlight.d.ts +29 -0
- package/esm/highlight/semanticsHighlight.d.ts.map +1 -0
- package/esm/highlight/semanticsHighlight.js +326 -0
- package/esm/highlight/utils.d.ts +3 -0
- package/esm/highlight/utils.d.ts.map +1 -0
- package/esm/highlight/utils.js +14 -0
- package/esm/hover.d.ts +17 -0
- package/esm/hover.d.ts.map +1 -0
- package/esm/hover.js +60 -0
- package/esm/index.d.ts +9 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +7 -0
- package/esm/labelElements.d.ts +22 -0
- package/esm/labelElements.d.ts.map +1 -0
- package/esm/labelElements.js +225 -0
- package/esm/maqlLanguageService.d.ts +51 -0
- package/esm/maqlLanguageService.d.ts.map +1 -0
- package/esm/maqlLanguageService.js +102 -0
- package/esm/maqlObjectTypes.d.ts +15 -0
- package/esm/maqlObjectTypes.d.ts.map +1 -0
- package/esm/maqlObjectTypes.js +28 -0
- package/esm/maqlServer.d.ts +4 -0
- package/esm/maqlServer.d.ts.map +1 -0
- package/esm/maqlServer.js +78 -0
- package/esm/metadata/model.d.ts +116 -0
- package/esm/metadata/model.d.ts.map +1 -0
- package/esm/metadata/model.js +137 -0
- package/esm/metadata/parameters.d.ts +16 -0
- package/esm/metadata/parameters.d.ts.map +1 -0
- package/esm/metadata/parameters.js +38 -0
- package/esm/metadata/types.d.ts +14 -0
- package/esm/metadata/types.d.ts.map +1 -0
- package/esm/metadata/types.js +2 -0
- package/esm/metadataService.d.ts +50 -0
- package/esm/metadataService.d.ts.map +1 -0
- package/esm/metadataService.js +156 -0
- package/esm/node/main.d.ts +2 -0
- package/esm/node/main.d.ts.map +1 -0
- package/esm/node/main.js +18 -0
- package/esm/parameterConstraints.d.ts +5 -0
- package/esm/parameterConstraints.d.ts.map +1 -0
- package/esm/parameterConstraints.js +198 -0
- package/esm/parseMaql.d.ts +43 -0
- package/esm/parseMaql.d.ts.map +1 -0
- package/esm/parseMaql.js +97 -0
- package/esm/renderParameters.d.ts +33 -0
- package/esm/renderParameters.d.ts.map +1 -0
- package/esm/renderParameters.js +72 -0
- package/esm/tests/metadata.test.helpers.d.ts +8 -0
- package/esm/tests/metadata.test.helpers.d.ts.map +1 -0
- package/esm/tests/metadata.test.helpers.js +468 -0
- package/esm/tokenRanges.d.ts +36 -0
- package/esm/tokenRanges.d.ts.map +1 -0
- package/esm/tokenRanges.js +54 -0
- package/esm/types/hierarchy.d.ts +37 -0
- package/esm/types/hierarchy.d.ts.map +1 -0
- package/esm/types/hierarchy.js +165 -0
- package/esm/types/signatures.d.ts +40 -0
- package/esm/types/signatures.d.ts.map +1 -0
- package/esm/types/signatures.js +142 -0
- package/esm/types/typeChecking.d.ts +56 -0
- package/esm/types/typeChecking.d.ts.map +1 -0
- package/esm/types/typeChecking.js +296 -0
- package/esm/types/typeModel.d.ts +18 -0
- package/esm/types/typeModel.d.ts.map +1 -0
- package/esm/types/typeModel.js +84 -0
- package/package.json +89 -3
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
// (C) 2022-2026 GoodData Corporation
|
|
2
|
+
import MaqlPkg from "@gooddata/maql-antlr4ts";
|
|
3
|
+
const { AbstractAstVisitor } = MaqlPkg;
|
|
4
|
+
import { isTigerType } from "@gooddata/sdk-backend-tiger";
|
|
5
|
+
import { normalizeMaqlObjectType } from "../maqlObjectTypes.js";
|
|
6
|
+
import { MaqlType, abstractValueTypes, isSubtype, lowestCommonAncestor } from "./hierarchy.js";
|
|
7
|
+
import { CallNotation, MaqlCallSignature, findFunctionDefinitions, getCustomDefinitions, } from "./signatures.js";
|
|
8
|
+
export class TypedAstNode {
|
|
9
|
+
type;
|
|
10
|
+
node;
|
|
11
|
+
constructor(type, node) {
|
|
12
|
+
this.type = type;
|
|
13
|
+
this.node = node;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export class AstTypeChecker extends AbstractAstVisitor {
|
|
17
|
+
model;
|
|
18
|
+
constructor(model) {
|
|
19
|
+
super();
|
|
20
|
+
this.model = model;
|
|
21
|
+
}
|
|
22
|
+
typeConstraintsViolations = [];
|
|
23
|
+
defaultResult() {
|
|
24
|
+
return new TypedAstNode(MaqlType.UNIT, null);
|
|
25
|
+
}
|
|
26
|
+
mergeResultWithParent(parentNode, result) {
|
|
27
|
+
return {
|
|
28
|
+
// oxlint-disable-next-line typescript-eslint/no-misused-spread
|
|
29
|
+
...result,
|
|
30
|
+
node: parentNode,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
visitEmptyNode(node) {
|
|
34
|
+
const message = "Missing expression" + (node.value === "" ? "" : `. ${node.value}`);
|
|
35
|
+
this.logViolation(message, node.range);
|
|
36
|
+
return new TypedAstNode(MaqlType.ALL, node);
|
|
37
|
+
}
|
|
38
|
+
visitSelectNode(node) {
|
|
39
|
+
if (node.by) {
|
|
40
|
+
this.visit(node.by);
|
|
41
|
+
}
|
|
42
|
+
if (node.forEach) {
|
|
43
|
+
this.visit(node.forEach);
|
|
44
|
+
}
|
|
45
|
+
if (node.datetimeTransformation) {
|
|
46
|
+
this.visit(node.datetimeTransformation);
|
|
47
|
+
}
|
|
48
|
+
if (node.filter) {
|
|
49
|
+
this.visit(node.filter);
|
|
50
|
+
}
|
|
51
|
+
if (node.using) {
|
|
52
|
+
this.visit(node.using);
|
|
53
|
+
}
|
|
54
|
+
if (node.parentFilterModification) {
|
|
55
|
+
this.visit(node.parentFilterModification);
|
|
56
|
+
}
|
|
57
|
+
return this.visit(node.expression);
|
|
58
|
+
}
|
|
59
|
+
visitExpressionNode(node) {
|
|
60
|
+
return this.visit(node.expression);
|
|
61
|
+
}
|
|
62
|
+
visitOperatorNode(node) {
|
|
63
|
+
const operands = node.content.map((operand) => this.visit(operand));
|
|
64
|
+
switch (node.type) {
|
|
65
|
+
case "not":
|
|
66
|
+
return this.checkBySignature(node, node.type, operands, CallNotation.PREFIX, getCustomDefinitions(node.type));
|
|
67
|
+
case "+":
|
|
68
|
+
case "-":
|
|
69
|
+
case "*":
|
|
70
|
+
case "/":
|
|
71
|
+
case "and":
|
|
72
|
+
case "or":
|
|
73
|
+
case "=":
|
|
74
|
+
case "<>":
|
|
75
|
+
case ">=":
|
|
76
|
+
case "<=":
|
|
77
|
+
case "<":
|
|
78
|
+
case ">":
|
|
79
|
+
case "like":
|
|
80
|
+
case "ilike":
|
|
81
|
+
case "not like":
|
|
82
|
+
case "not ilike":
|
|
83
|
+
return this.checkBySignature(node, node.type, operands, CallNotation.INFIX, getCustomDefinitions(node.type));
|
|
84
|
+
case "neg":
|
|
85
|
+
return this.checkUnaryMinusOperator(node, operands);
|
|
86
|
+
case "between":
|
|
87
|
+
case "not between":
|
|
88
|
+
return this.checkBetween(node, operands);
|
|
89
|
+
case "in":
|
|
90
|
+
case "not in":
|
|
91
|
+
return this.checkIn(node, operands);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
checkUnaryMinusOperator(node, operands) {
|
|
95
|
+
if (!this.checkOperandCount(node, operands.length, 1, "Unary operator '-'")) {
|
|
96
|
+
return new TypedAstNode(MaqlType.NUMERIC, node);
|
|
97
|
+
}
|
|
98
|
+
const operand = operands[0];
|
|
99
|
+
// Propagate the type of the operand if it is a subtype of NUMERIC
|
|
100
|
+
// e.g. if it is INTEGER_LITERAL, keep it
|
|
101
|
+
const returnType = this.checkType(operand, MaqlType.NUMERIC) ? operand.type : MaqlType.NUMERIC;
|
|
102
|
+
return new TypedAstNode(returnType, node);
|
|
103
|
+
}
|
|
104
|
+
checkBetween(node, operands) {
|
|
105
|
+
if (!this.checkOperandCount(node, operands.length, 3, `Operator ${node.type.toUpperCase()}`)) {
|
|
106
|
+
return new TypedAstNode(MaqlType.BOOLEAN, node);
|
|
107
|
+
}
|
|
108
|
+
const [expr, from, to] = operands;
|
|
109
|
+
this.checkType(expr, ...abstractValueTypes);
|
|
110
|
+
// if we can't determine the type of the expression, don't validate the types of from and to
|
|
111
|
+
if (expr.type !== MaqlType.ALL) {
|
|
112
|
+
this.checkType(from, expr.type);
|
|
113
|
+
this.checkType(to, expr.type);
|
|
114
|
+
}
|
|
115
|
+
return new TypedAstNode(MaqlType.BOOLEAN, node);
|
|
116
|
+
}
|
|
117
|
+
checkIn(node, operands) {
|
|
118
|
+
if (!this.checkOperandCount(node, operands.length, 2, `Operator ${node.type.toUpperCase()}`)) {
|
|
119
|
+
return new TypedAstNode(MaqlType.BOOLEAN, node);
|
|
120
|
+
}
|
|
121
|
+
const [expr, list] = operands;
|
|
122
|
+
this.checkType(expr, ...abstractValueTypes);
|
|
123
|
+
// if we can't determine the type of the expression, don't validate the type of list
|
|
124
|
+
if (expr.type !== MaqlType.ALL) {
|
|
125
|
+
this.checkType(list, expr.type);
|
|
126
|
+
}
|
|
127
|
+
return new TypedAstNode(MaqlType.BOOLEAN, node);
|
|
128
|
+
}
|
|
129
|
+
visitListNode(node) {
|
|
130
|
+
if (node.content.length > 0) {
|
|
131
|
+
return this.visitChildren(node);
|
|
132
|
+
}
|
|
133
|
+
return new TypedAstNode(MaqlType.ALL, node);
|
|
134
|
+
}
|
|
135
|
+
visitFunctionNode(node) {
|
|
136
|
+
const defs = findFunctionDefinitions(node.type, node.name);
|
|
137
|
+
if (defs.length === 0) {
|
|
138
|
+
this.logViolation(`No definition for function '${node.name}'`, node.range);
|
|
139
|
+
return new TypedAstNode(MaqlType.ALL, node);
|
|
140
|
+
}
|
|
141
|
+
const args = node.content.map((arg) => this.visit(arg));
|
|
142
|
+
return this.checkBySignature(node, node.name, args, CallNotation.FUNCTION, defs);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Checks functions and operators that have defined signatures.
|
|
146
|
+
*/
|
|
147
|
+
checkBySignature(node, name, args, notation, defs) {
|
|
148
|
+
const signature = new MaqlCallSignature(name, args, notation);
|
|
149
|
+
const validDefs = this.findValidDefinitions(signature, defs, node.range);
|
|
150
|
+
if (validDefs.length === 0) {
|
|
151
|
+
// if all available definitions have the same return type we can use it
|
|
152
|
+
const commonReturnType = defs.length > 0 && defs.every((def) => def.returns.type === defs[0].returns.type)
|
|
153
|
+
? defs[0].returns.type
|
|
154
|
+
: MaqlType.ALL;
|
|
155
|
+
return new TypedAstNode(commonReturnType, node);
|
|
156
|
+
}
|
|
157
|
+
// If multiple valid definitions remain, use the first one
|
|
158
|
+
const def = validDefs[0];
|
|
159
|
+
return new TypedAstNode(def.returns.type, node);
|
|
160
|
+
}
|
|
161
|
+
findValidDefinitions(signature, defs, range) {
|
|
162
|
+
const validDefs = defs
|
|
163
|
+
.filter((def) => {
|
|
164
|
+
return def.parameters.length === signature.parameters.length || def.vararg;
|
|
165
|
+
})
|
|
166
|
+
.filter((def) => {
|
|
167
|
+
const argTypes = signature.parameters.map((arg) => arg.type);
|
|
168
|
+
// get the function signature or if the definition is `vararg` then match the number of arguments
|
|
169
|
+
const paramTypes = def.vararg
|
|
170
|
+
? Array(argTypes.length).fill(def.parameters[0].type)
|
|
171
|
+
: def.parameters.map((param) => param.type);
|
|
172
|
+
return argTypes.every((argType, idx) => {
|
|
173
|
+
const paramType = paramTypes[idx];
|
|
174
|
+
return isSubtype(argType, paramType);
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
if (validDefs.length === 0) {
|
|
178
|
+
const receivedSignature = signature.toString();
|
|
179
|
+
const expectedSignatures = defs.map((def) => def.toString());
|
|
180
|
+
this.logViolation(`The call expression '${receivedSignature}' has invalid arguments\n` +
|
|
181
|
+
"Possible definitions:\n" +
|
|
182
|
+
expectedSignatures.join("\n"), range);
|
|
183
|
+
}
|
|
184
|
+
return validDefs;
|
|
185
|
+
}
|
|
186
|
+
visitRunningFunctionNode(node) {
|
|
187
|
+
if (node.within) {
|
|
188
|
+
this.visit(node.within);
|
|
189
|
+
}
|
|
190
|
+
if (node.rollWindow) {
|
|
191
|
+
this.visit(node.rollWindow);
|
|
192
|
+
}
|
|
193
|
+
return this.visit(node.functionNode);
|
|
194
|
+
}
|
|
195
|
+
visitRankFunctionNode(node) {
|
|
196
|
+
if (node.within) {
|
|
197
|
+
this.visit(node.within);
|
|
198
|
+
}
|
|
199
|
+
return this.visit(node.functionNode);
|
|
200
|
+
}
|
|
201
|
+
visitLastFirstValueFunctionNode(node) {
|
|
202
|
+
if (node.orderBy) {
|
|
203
|
+
this.visit(node.orderBy);
|
|
204
|
+
}
|
|
205
|
+
if (node.within) {
|
|
206
|
+
this.visit(node.within);
|
|
207
|
+
}
|
|
208
|
+
return this.visit(node.functionNode);
|
|
209
|
+
}
|
|
210
|
+
visitOrderByElement(node) {
|
|
211
|
+
this.checkType(this.visit(node.content[0]), ...abstractValueTypes);
|
|
212
|
+
return new TypedAstNode(MaqlType.UNIT, node);
|
|
213
|
+
}
|
|
214
|
+
visitRankingFilterNode(node) {
|
|
215
|
+
this.checkType(this.visit(node.rankSpec), MaqlType.NUMERIC_LITERAL);
|
|
216
|
+
node.operands.forEach((operand) => this.visit(operand));
|
|
217
|
+
if (node.within) {
|
|
218
|
+
this.visit(node.within);
|
|
219
|
+
}
|
|
220
|
+
return new TypedAstNode(MaqlType.BOOLEAN, node);
|
|
221
|
+
}
|
|
222
|
+
visitCaseNode(node) {
|
|
223
|
+
const branchTypes = node.content.map((branch) => this.visit(branch).type);
|
|
224
|
+
const exprType = this.findCompatibleSupertype(branchTypes);
|
|
225
|
+
return new TypedAstNode(exprType, node);
|
|
226
|
+
}
|
|
227
|
+
visitConditionalNode(node) {
|
|
228
|
+
this.checkType(this.visit(node.condition), MaqlType.BOOLEAN);
|
|
229
|
+
const exprType = this.visit(node.expression);
|
|
230
|
+
this.checkType(exprType, ...abstractValueTypes);
|
|
231
|
+
return exprType;
|
|
232
|
+
}
|
|
233
|
+
visitIdentifierNode(node) {
|
|
234
|
+
// The AST carries the object type as the author spelled it in MAQL, in any casing.
|
|
235
|
+
const objectType = normalizeMaqlObjectType(node.objectType.toLowerCase());
|
|
236
|
+
if (isTigerType(objectType)) {
|
|
237
|
+
return new TypedAstNode(this.model.getType(objectType, node.id), node);
|
|
238
|
+
}
|
|
239
|
+
return new TypedAstNode(MaqlType.ALL, node);
|
|
240
|
+
}
|
|
241
|
+
visitBooleanLiteralNode(node) {
|
|
242
|
+
return new TypedAstNode(MaqlType.BOOLEAN, node);
|
|
243
|
+
}
|
|
244
|
+
visitNumberLiteralNode(node) {
|
|
245
|
+
const numberType = node.format === "integer" ? MaqlType.INTEGER_LITERAL : MaqlType.NUMERIC_LITERAL;
|
|
246
|
+
return new TypedAstNode(numberType, node);
|
|
247
|
+
}
|
|
248
|
+
visitStringLiteralNode(node) {
|
|
249
|
+
return new TypedAstNode(MaqlType.STRING_LITERAL, node);
|
|
250
|
+
}
|
|
251
|
+
visitNullLiteralNode(node) {
|
|
252
|
+
return new TypedAstNode(MaqlType.NULL_LITERAL, node);
|
|
253
|
+
}
|
|
254
|
+
visitGranularityNode(node) {
|
|
255
|
+
const granularityType = this.model.granularities.getType(node.value);
|
|
256
|
+
if (granularityType === MaqlType.GRANULARITY) {
|
|
257
|
+
// granularity not recognized - either `DatetimeGranularities` does not contain all granularities
|
|
258
|
+
// or error node is encountered
|
|
259
|
+
this.logViolation(`Unrecognized datetime granularity '${node.value}'`, node.range);
|
|
260
|
+
}
|
|
261
|
+
return new TypedAstNode(granularityType, node);
|
|
262
|
+
}
|
|
263
|
+
visitFilterNode(node) {
|
|
264
|
+
this.checkType(this.visit(node.condition), MaqlType.BOOLEAN);
|
|
265
|
+
return new TypedAstNode(MaqlType.UNIT, node);
|
|
266
|
+
}
|
|
267
|
+
findCompatibleSupertype(types) {
|
|
268
|
+
return types.reduce((left, right) => lowestCommonAncestor(left, right));
|
|
269
|
+
}
|
|
270
|
+
checkOperandCount(node, actualCount, expectedCount, nodeName) {
|
|
271
|
+
if (actualCount !== expectedCount) {
|
|
272
|
+
this.logUnexpectedOperandCount(actualCount, node.range, `${nodeName} expects ${expectedCount} operands`);
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
checkType(marker, ...expected) {
|
|
278
|
+
const isValid = expected.some((expectedType) => isSubtype(marker.type, expectedType));
|
|
279
|
+
if (!isValid) {
|
|
280
|
+
this.logIncompatibleSubtype(expected, marker.type, marker.node?.range);
|
|
281
|
+
}
|
|
282
|
+
return isValid;
|
|
283
|
+
}
|
|
284
|
+
logIncompatibleSubtype(expected, received, range) {
|
|
285
|
+
const expMessage = expected.map((type) => `'${MaqlType[type]}'`).join(" or ");
|
|
286
|
+
const message = `Type mismatch: Expected ${expMessage}, but got '${MaqlType[received]}'`;
|
|
287
|
+
this.logViolation(message, range);
|
|
288
|
+
}
|
|
289
|
+
logUnexpectedOperandCount(count, range, extraInfo = "") {
|
|
290
|
+
const message = [`Unexpected count of operands: ${count}`, extraInfo].join(". ");
|
|
291
|
+
this.logViolation(message, range);
|
|
292
|
+
}
|
|
293
|
+
logViolation(message, range) {
|
|
294
|
+
this.typeConstraintsViolations.push({ message, range });
|
|
295
|
+
}
|
|
296
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TigerObjectType } from "@gooddata/sdk-backend-tiger";
|
|
2
|
+
import { MaqlType } from "./hierarchy.js";
|
|
3
|
+
/**
|
|
4
|
+
* Simplified logical model which holds MAQL type information
|
|
5
|
+
*/
|
|
6
|
+
export declare class TypeModel {
|
|
7
|
+
readonly granularities: DatetimeGranularities;
|
|
8
|
+
private readonly labelSet;
|
|
9
|
+
private readonly dateLabelSet;
|
|
10
|
+
constructor(labels?: string[], dateLabels?: string[]);
|
|
11
|
+
getType(objectType: TigerObjectType, id: string): MaqlType;
|
|
12
|
+
}
|
|
13
|
+
export declare class DatetimeGranularities {
|
|
14
|
+
readonly chronologicalGranularities: Set<string>;
|
|
15
|
+
readonly periodicalGranularities: Set<string>;
|
|
16
|
+
getType(granularity: string): MaqlType;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=typeModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeModel.d.ts","sourceRoot":"","sources":["../../src/types/typeModel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;GAEG;AACH,qBAAa,SAAS;IAClB,QAAQ,CAAC,aAAa,wBAA+B;IACrD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAc;IACvC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAE3C,YAAY,MAAM,GAAE,MAAM,EAAO,EAAE,UAAU,GAAE,MAAM,EAAO,EAG3D;IAED,OAAO,CAAC,UAAU,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAyBzD;CACJ;AAED,qBAAa,qBAAqB;IAC9B,QAAQ,CAAC,0BAA0B,cAahC;IACH,QAAQ,CAAC,uBAAuB,cAa7B;IAEH,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,CASrC;CACJ"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// (C) 2022-2026 GoodData Corporation
|
|
2
|
+
import { MaqlType } from "./hierarchy.js";
|
|
3
|
+
/**
|
|
4
|
+
* Simplified logical model which holds MAQL type information
|
|
5
|
+
*/
|
|
6
|
+
export class TypeModel {
|
|
7
|
+
granularities = new DatetimeGranularities();
|
|
8
|
+
labelSet;
|
|
9
|
+
dateLabelSet;
|
|
10
|
+
constructor(labels = [], dateLabels = []) {
|
|
11
|
+
this.labelSet = new Set(labels);
|
|
12
|
+
this.dateLabelSet = new Set(dateLabels);
|
|
13
|
+
}
|
|
14
|
+
getType(objectType, id) {
|
|
15
|
+
switch (objectType) {
|
|
16
|
+
case "dataset":
|
|
17
|
+
return MaqlType.DATASET;
|
|
18
|
+
case "fact":
|
|
19
|
+
return MaqlType.NUMERIC;
|
|
20
|
+
case "attribute":
|
|
21
|
+
case "label":
|
|
22
|
+
if (this.labelSet.has(id)) {
|
|
23
|
+
return MaqlType.STRING;
|
|
24
|
+
}
|
|
25
|
+
else if (this.dateLabelSet.has(id)) {
|
|
26
|
+
return MaqlType.DATE;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
// Unrecognized ID, we can make no further claims
|
|
30
|
+
return MaqlType.STRING_AND_DATE;
|
|
31
|
+
}
|
|
32
|
+
case "computedAttribute":
|
|
33
|
+
// A computed attribute buckets rows into string values.
|
|
34
|
+
return MaqlType.STRING;
|
|
35
|
+
case "metric":
|
|
36
|
+
// TODO add option to resolve metric type
|
|
37
|
+
return MaqlType.ALL;
|
|
38
|
+
default:
|
|
39
|
+
return MaqlType.ALL;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export class DatetimeGranularities {
|
|
44
|
+
chronologicalGranularities = new Set([
|
|
45
|
+
"timestamp",
|
|
46
|
+
"second",
|
|
47
|
+
"minute",
|
|
48
|
+
"hour",
|
|
49
|
+
"day",
|
|
50
|
+
"month",
|
|
51
|
+
"year",
|
|
52
|
+
"quarter",
|
|
53
|
+
"week",
|
|
54
|
+
"fiscalyear",
|
|
55
|
+
"fiscalquarter",
|
|
56
|
+
"fiscalmonth",
|
|
57
|
+
]);
|
|
58
|
+
periodicalGranularities = new Set([
|
|
59
|
+
"secondofminute",
|
|
60
|
+
"secondofday",
|
|
61
|
+
"minuteofhour",
|
|
62
|
+
"minuteofday",
|
|
63
|
+
"hourofday",
|
|
64
|
+
"dayofweek",
|
|
65
|
+
"dayofmonth",
|
|
66
|
+
"dayofquarter",
|
|
67
|
+
"dayofyear",
|
|
68
|
+
"weekofyear",
|
|
69
|
+
"monthofyear",
|
|
70
|
+
"quarterofyear",
|
|
71
|
+
]);
|
|
72
|
+
getType(granularity) {
|
|
73
|
+
const value = granularity.toLowerCase();
|
|
74
|
+
if (this.chronologicalGranularities.has(value)) {
|
|
75
|
+
return MaqlType.CHRONOLOGICAL_GRANULARITY;
|
|
76
|
+
}
|
|
77
|
+
else if (this.periodicalGranularities.has(value)) {
|
|
78
|
+
return MaqlType.PERIODICAL_GRANULARITY;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return MaqlType.GRANULARITY;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,92 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-maql-language-server",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "11.65.0-alpha.4",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Stellar",
|
|
7
|
+
"email": "stellar@gooddata.com"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/gooddata/gooddata-ui-sdk.git",
|
|
12
|
+
"directory": "libs/sdk-maql-language-server"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"esm",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "esm/index.js",
|
|
20
|
+
"browser": "esm/index.js",
|
|
21
|
+
"types": "esm/index.d.ts",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@gooddata/maql-antlr4ts": "0.5.1-02977c25.0",
|
|
24
|
+
"antlr4-c3": "1.1.16",
|
|
25
|
+
"antlr4ts": "0.5.0-alpha.4",
|
|
26
|
+
"assert": "2.1.0",
|
|
27
|
+
"lodash-es": "^4.17.23",
|
|
28
|
+
"util": "0.12.5",
|
|
29
|
+
"vscode-languageserver": "8.1.0",
|
|
30
|
+
"vscode-languageserver-textdocument": "1.0.12",
|
|
31
|
+
"@gooddata/sdk-backend-base": "11.65.0-alpha.4",
|
|
32
|
+
"@gooddata/sdk-backend-spi": "11.65.0-alpha.4",
|
|
33
|
+
"@gooddata/sdk-backend-tiger": "11.65.0-alpha.4",
|
|
34
|
+
"@gooddata/sdk-model": "11.65.0-alpha.4"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/isomorphic-fetch": "0.0.39",
|
|
38
|
+
"@types/lodash-es": "4.17.12",
|
|
39
|
+
"@types/node": "24.12.0",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "8.58.0",
|
|
41
|
+
"@typescript-eslint/parser": "8.58.0",
|
|
42
|
+
"@vitest/coverage-v8": "5.0.4",
|
|
43
|
+
"colors": "1.4.0",
|
|
44
|
+
"eslint": "^9.39.2",
|
|
45
|
+
"eslint-plugin-headers": "1.3.3",
|
|
46
|
+
"eslint-plugin-import-esm": "1.2.1",
|
|
47
|
+
"eslint-plugin-jsdoc": "62.1.0",
|
|
48
|
+
"eslint-plugin-no-barrel-files": "1.2.2",
|
|
49
|
+
"eslint-plugin-no-only-tests": "3.3.0",
|
|
50
|
+
"eslint-plugin-regexp": "1.15.0",
|
|
51
|
+
"eslint-plugin-sonarjs": "3.0.6",
|
|
52
|
+
"eslint-plugin-tsdoc": "0.2.14",
|
|
53
|
+
"glob": "13.0.2",
|
|
54
|
+
"jiti": "2.6.1",
|
|
55
|
+
"lint-staged": "10.5.4",
|
|
56
|
+
"npm-run-all": "4.1.5",
|
|
57
|
+
"oxfmt": "0.68.0",
|
|
58
|
+
"oxlint": "1.83.0",
|
|
59
|
+
"oxlint-plugin-eslint": "1.82.0",
|
|
60
|
+
"oxlint-tsgolint": "7.0.2001",
|
|
61
|
+
"process": "0.11.10",
|
|
62
|
+
"rolldown": "1.0.3",
|
|
63
|
+
"ts-dedent": "2.3.0",
|
|
64
|
+
"ts-node": "10.9.2",
|
|
65
|
+
"tslib": "2.8.1",
|
|
66
|
+
"typescript": "7.0.2",
|
|
67
|
+
"vite": "8.0.16",
|
|
68
|
+
"vitest": "5.0.4",
|
|
69
|
+
"@gooddata/eslint-config": "11.65.0-alpha.4",
|
|
70
|
+
"@gooddata/api-client-tiger": "11.65.0-alpha.4",
|
|
71
|
+
"@gooddata/oxlint-config": "11.65.0-alpha.4",
|
|
72
|
+
"@gooddata/stylelint-config": "11.65.0-alpha.4"
|
|
73
|
+
},
|
|
74
|
+
"scripts": {
|
|
75
|
+
"_phase:build": "npm run build",
|
|
76
|
+
"_phase:test": "npm run test-once",
|
|
77
|
+
"_phase:validate": "npm run validate",
|
|
78
|
+
"build": "npm-run-all -p build-check build-ts",
|
|
79
|
+
"build-check": "tsc -p tsconfig.check.json",
|
|
80
|
+
"build-ts": "tsc -p ./tsconfig.build.json",
|
|
81
|
+
"clean": "../../common/scripts/clean-command-state.sh && rm -rf esm *.log",
|
|
82
|
+
"format-check": "oxfmt --check .",
|
|
83
|
+
"format-write": "oxfmt .",
|
|
84
|
+
"lint": "oxlint . --quiet && eslint .",
|
|
85
|
+
"lint-fix": "oxlint . --quiet --fix && eslint . --fix",
|
|
86
|
+
"test": "vitest",
|
|
87
|
+
"test-once": "vitest run",
|
|
88
|
+
"update-docs": "tsc -p ./scripts && node scripts/build/docsParser.js src/docs",
|
|
89
|
+
"validate": "npm run lint && npm run format-check",
|
|
90
|
+
"watch": "tsc -watch -p ./tsconfig.build.json"
|
|
91
|
+
}
|
|
6
92
|
}
|