@routier/core 0.5.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.
- package/README.md +1 -1
- package/dist/assertions/index.cjs +19 -8
- package/dist/assertions/index.cjs.map +1 -1
- package/dist/assertions/index.d.ts +5 -1
- package/dist/assertions/index.js +21 -9
- package/dist/assertions/index.js.map +1 -1
- package/dist/collections/MemoryDataCollection.d.ts +10 -0
- package/dist/collections/index.cjs +29 -4
- package/dist/collections/index.cjs.map +1 -1
- package/dist/collections/index.js +29 -4
- package/dist/collections/index.js.map +1 -1
- package/dist/expressions/callSource.d.ts +41 -0
- package/dist/expressions/evaluate.d.ts +3 -0
- package/dist/expressions/fold.d.ts +7 -0
- package/dist/expressions/index.cjs +1754 -233
- package/dist/expressions/index.cjs.map +1 -1
- package/dist/expressions/index.d.ts +2 -0
- package/dist/expressions/index.js +1765 -234
- package/dist/expressions/index.js.map +1 -1
- package/dist/expressions/types.d.ts +45 -26
- package/dist/expressions/utils.d.ts +19 -1
- package/dist/index.cjs +2429 -363
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2769 -682
- package/dist/index.js.map +1 -1
- package/dist/performance/index.cjs +6 -4
- package/dist/performance/index.cjs.map +1 -1
- package/dist/performance/index.js +6 -4
- package/dist/performance/index.js.map +1 -1
- package/dist/pipeline/index.cjs +6 -4
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.js +6 -4
- package/dist/pipeline/index.js.map +1 -1
- package/dist/plugins/index.cjs +2323 -316
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +2328 -311
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/query/QueryOptionsCollection.d.ts +38 -10
- package/dist/plugins/query/describeFilter.d.ts +83 -0
- package/dist/plugins/query/explain.d.ts +71 -9
- package/dist/plugins/query/index.d.ts +1 -0
- package/dist/plugins/query/join.d.ts +4 -1
- package/dist/plugins/query/types.d.ts +36 -4
- package/dist/plugins/resultShape.d.ts +35 -0
- package/dist/schema/PropertyInfo.d.ts +0 -1
- package/dist/schema/index.cjs +7 -14
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.js +7 -14
- package/dist/schema/index.js.map +1 -1
- package/dist/transfer/ChunkEncoder.d.ts +60 -0
- package/dist/transfer/decoder.d.ts +29 -0
- package/dist/transfer/fillers.d.ts +36 -0
- package/dist/transfer/index.cjs +873 -0
- package/dist/transfer/index.cjs.map +1 -0
- package/dist/transfer/index.d.ts +47 -0
- package/dist/transfer/index.js +872 -0
- package/dist/transfer/index.js.map +1 -0
- package/dist/transfer/plan.d.ts +94 -0
- package/dist/transfer/types.d.ts +138 -0
- package/dist/utilities/index.cjs +242 -49
- package/dist/utilities/index.cjs.map +1 -1
- package/dist/utilities/index.js +242 -49
- package/dist/utilities/index.js.map +1 -1
- package/package.json +9 -1
package/dist/schema/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
2141
|
+
return value;
|
|
2149
2142
|
}
|
|
2150
2143
|
}
|
|
2151
2144
|
|