@routier/core 0.6.0 → 0.7.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.
Files changed (52) hide show
  1. package/dist/assertions/index.cjs +19 -8
  2. package/dist/assertions/index.cjs.map +1 -1
  3. package/dist/assertions/index.d.ts +5 -1
  4. package/dist/assertions/index.js +21 -9
  5. package/dist/assertions/index.js.map +1 -1
  6. package/dist/collections/MemoryDataCollection.d.ts +10 -0
  7. package/dist/collections/index.cjs +29 -4
  8. package/dist/collections/index.cjs.map +1 -1
  9. package/dist/collections/index.js +29 -4
  10. package/dist/collections/index.js.map +1 -1
  11. package/dist/expressions/callSource.d.ts +41 -0
  12. package/dist/expressions/evaluate.d.ts +3 -0
  13. package/dist/expressions/fold.d.ts +7 -0
  14. package/dist/expressions/index.cjs +1754 -233
  15. package/dist/expressions/index.cjs.map +1 -1
  16. package/dist/expressions/index.d.ts +2 -0
  17. package/dist/expressions/index.js +1765 -234
  18. package/dist/expressions/index.js.map +1 -1
  19. package/dist/expressions/types.d.ts +45 -26
  20. package/dist/expressions/utils.d.ts +19 -1
  21. package/dist/index.cjs +2415 -364
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.js +2755 -684
  24. package/dist/index.js.map +1 -1
  25. package/dist/performance/index.cjs +6 -4
  26. package/dist/performance/index.cjs.map +1 -1
  27. package/dist/performance/index.js +6 -4
  28. package/dist/performance/index.js.map +1 -1
  29. package/dist/pipeline/index.cjs +6 -4
  30. package/dist/pipeline/index.cjs.map +1 -1
  31. package/dist/pipeline/index.js +6 -4
  32. package/dist/pipeline/index.js.map +1 -1
  33. package/dist/plugins/index.cjs +2309 -316
  34. package/dist/plugins/index.cjs.map +1 -1
  35. package/dist/plugins/index.js +2313 -311
  36. package/dist/plugins/index.js.map +1 -1
  37. package/dist/plugins/query/QueryOptionsCollection.d.ts +38 -10
  38. package/dist/plugins/query/describeFilter.d.ts +83 -0
  39. package/dist/plugins/query/explain.d.ts +71 -9
  40. package/dist/plugins/query/index.d.ts +1 -0
  41. package/dist/plugins/query/join.d.ts +4 -1
  42. package/dist/plugins/query/types.d.ts +36 -4
  43. package/dist/schema/PropertyInfo.d.ts +0 -1
  44. package/dist/schema/index.cjs +7 -14
  45. package/dist/schema/index.cjs.map +1 -1
  46. package/dist/schema/index.js +7 -14
  47. package/dist/schema/index.js.map +1 -1
  48. package/dist/utilities/index.cjs +242 -49
  49. package/dist/utilities/index.cjs.map +1 -1
  50. package/dist/utilities/index.js +242 -49
  51. package/dist/utilities/index.js.map +1 -1
  52. package/package.json +1 -1
@@ -616,12 +616,14 @@ const isLogLevel = (value)=>typeof value === 'string' && LOG_LEVELS.includes(val
616
616
  const debug = process.env.DEBUG;
617
617
  if (debug === 'routier' || debug === '*') return 'debug';
618
618
  const env = "production"?.toLowerCase();
619
- // `test` is deliberately absent. It used to be here, which meant no test suite anywhere
620
- // could run Routier quietly. Opt in with DEBUG=routier or ROUTIER_LOG_LEVEL when a test
621
- // needs the output.
622
619
  if (env === 'dev' || env === 'development') return 'debug';
623
620
  }
624
- return 'silent';
621
+ // Warnings are on unless something turns them off.
622
+ //
623
+ // Routier warns when a query returns correct rows a slower way than it could, or when a filter
624
+ // compares types that can never match. Both are the caller's to act on, and a default of
625
+ // `silent` meant the only people who ever saw them were the ones who already knew to look.
626
+ return 'warn';
625
627
  };
626
628
  let level = resolveLevel();
627
629
  let rank = RANK[level];
@@ -1765,12 +1767,6 @@ class SchemaComputed extends SchemaBase {
1765
1767
  ;// CONCATENATED MODULE: ./src/schema/PropertyInfo.ts
1766
1768
 
1767
1769
 
1768
- const SUPPORTED_DESERIALIZATION_TYPES = new Set([
1769
- types/* .SchemaTypes.Boolean */.L.Boolean,
1770
- types/* .SchemaTypes.Date */.L.Date,
1771
- types/* .SchemaTypes.Number */.L.Number,
1772
- types/* .SchemaTypes.String */.L.String
1773
- ]);
1774
1770
  /**
1775
1771
  * Represents metadata and utilities for a property in a schema, including its type, name, parent, children, and serialization details.
1776
1772
  */ class PropertyInfo {
@@ -1890,9 +1886,6 @@ const SUPPORTED_DESERIALIZATION_TYPES = new Set([
1890
1886
  get isRenamed() {
1891
1887
  return !!this.from;
1892
1888
  }
1893
- get supportsDeserialization() {
1894
- return this.valueDeserializer != null || SUPPORTED_DESERIALIZATION_TYPES.has(this.type);
1895
- }
1896
1889
  _getPropertyChain() {
1897
1890
  if (this._propertyChainCache) {
1898
1891
  return this._propertyChainCache;
@@ -2145,7 +2138,7 @@ const SUPPORTED_DESERIALIZATION_TYPES = new Set([
2145
2138
  if (this.type === types/* .SchemaTypes.Boolean */.L.Boolean) {
2146
2139
  return Boolean(value);
2147
2140
  }
2148
- throw new Error(`Unsupported deserialization for type. Type: ${this.type}`);
2141
+ return value;
2149
2142
  }
2150
2143
  }
2151
2144