mongodb-explain-compat 2.9.0 → 2.10.0

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/.esm-wrapper.mjs CHANGED
@@ -1,3 +1,7 @@
1
1
  import mod from "./lib/index.js";
2
2
 
3
3
  export default mod;
4
+ export const getStageCursorKey = mod.getStageCursorKey;
5
+ export const isAggregationExplain = mod.isAggregationExplain;
6
+ export const isShardedAggregationExplain = mod.isShardedAggregationExplain;
7
+ export const isShardedFindExplain = mod.isShardedFindExplain;
package/lib/index.js CHANGED
@@ -87,7 +87,7 @@ function isShardedAggregationExplain(explain) {
87
87
  return !!explain.shards;
88
88
  }
89
89
 
90
- function isShardedFind(explain) {
90
+ function isShardedFindExplain(explain) {
91
91
  const { mongosPlannerVersion } = explain.queryPlanner ?? {};
92
92
  return !isNaN(mongosPlannerVersion);
93
93
  }
@@ -126,7 +126,7 @@ module.exports = function (explain) {
126
126
  explain = mapUnshardedAggregation(explain);
127
127
  }
128
128
  } else {
129
- if (isShardedFind(explain)) {
129
+ if (isShardedFindExplain(explain)) {
130
130
  explain = mapShardedFind(explain);
131
131
  } else {
132
132
  explain = mapUnshardedFind(explain);
@@ -211,3 +211,9 @@ function _mapPlannerStage(planner) {
211
211
  }
212
212
  return planner;
213
213
  }
214
+
215
+ module.exports.getStageCursorKey = getStageCursorKey;
216
+
217
+ module.exports.isAggregationExplain = isAggregationExplain;
218
+ module.exports.isShardedAggregationExplain = isShardedAggregationExplain;
219
+ module.exports.isShardedFindExplain = isShardedFindExplain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb-explain-compat",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Convert mongodb SBE explain output to 4.4 explain output",
5
5
  "keywords": [
6
6
  "mongodb",
@@ -54,5 +54,5 @@
54
54
  "mocha": "^8.1.3",
55
55
  "nyc": "^15.1.0"
56
56
  },
57
- "gitHead": "63c32b940f523e4c3e45b86a5aecaeadef93253f"
57
+ "gitHead": "a4e705ec6d13393d2e14e906838bb67548e7ae35"
58
58
  }