@routier/core 0.7.0 → 0.8.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/dist/codegen/blocks.d.ts +17 -1
- package/dist/codegen/handlers/types.d.ts +13 -5
- package/dist/codegen/index.cjs +28 -0
- package/dist/codegen/index.cjs.map +1 -1
- package/dist/codegen/index.js +28 -0
- package/dist/codegen/index.js.map +1 -1
- package/dist/collections/MemoryDataCollection.d.ts +2 -4
- package/dist/collections/index.cjs +127 -15
- package/dist/collections/index.cjs.map +1 -1
- package/dist/collections/index.js +127 -15
- package/dist/collections/index.js.map +1 -1
- package/dist/expressions/index.cjs +226 -4
- package/dist/expressions/index.cjs.map +1 -1
- package/dist/expressions/index.js +228 -5
- package/dist/expressions/index.js.map +1 -1
- package/dist/expressions/parser.d.ts +42 -1
- package/dist/index.cjs +753 -345
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +756 -345
- package/dist/index.js.map +1 -1
- package/dist/plugins/EphemeralDataPlugin.d.ts +8 -0
- package/dist/plugins/index.cjs +566 -49
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.js +566 -48
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/query/QueryOptionsCollection.d.ts +15 -5
- package/dist/plugins/query/index.d.ts +1 -0
- package/dist/plugins/query/renames.d.ts +27 -0
- package/dist/plugins/query/types.d.ts +15 -1
- package/dist/plugins/translators/SqlTranslator.d.ts +15 -0
- package/dist/schema/SchemaDefinition.d.ts +8 -0
- package/dist/schema/changeTracker.d.ts +10 -0
- package/dist/schema/index.cjs +291 -274
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +294 -276
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types.d.ts +8 -7
- package/dist/schema/utils/storageDates.d.ts +25 -0
- package/dist/transfer/index.cjs.map +1 -1
- package/dist/transfer/index.js.map +1 -1
- package/dist/utilities/index.cjs +74 -29
- package/dist/utilities/index.cjs.map +1 -1
- package/dist/utilities/index.js +74 -29
- package/dist/utilities/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/codegen/utils.d.ts +0 -22
package/dist/index.js
CHANGED
|
@@ -463,6 +463,14 @@ class FunctionFactoryBuilder extends ContainerBlock {
|
|
|
463
463
|
this._params.push(...params);
|
|
464
464
|
return this;
|
|
465
465
|
}
|
|
466
|
+
/**
|
|
467
|
+
* Adds a factory parameter carrying `value` and returns its name, for generated code to
|
|
468
|
+
* refer to. See `CodeBuilder.bind` for why values travel this way.
|
|
469
|
+
*/ bind(value) {
|
|
470
|
+
const parameter = this.createParameter(value);
|
|
471
|
+
this._params.push(parameter);
|
|
472
|
+
return parameter.name;
|
|
473
|
+
}
|
|
466
474
|
return() {
|
|
467
475
|
this._return = true;
|
|
468
476
|
return this;
|
|
@@ -578,6 +586,26 @@ class IfBuilder extends ContainerBlock {
|
|
|
578
586
|
}
|
|
579
587
|
}
|
|
580
588
|
class CodeBuilder extends ContainerBlock {
|
|
589
|
+
_bindings = [];
|
|
590
|
+
/**
|
|
591
|
+
* Makes `value` available to the generated function under the returned name.
|
|
592
|
+
*
|
|
593
|
+
* Generated code must never reach a runtime value by its source name or by pasting its
|
|
594
|
+
* source text: a minifier renames the declaration and cannot see inside the generated
|
|
595
|
+
* string, and pasted source loses the scope it closed over (#40, #46). A binding is passed
|
|
596
|
+
* in as a real value when the function is compiled, so it survives any bundler.
|
|
597
|
+
*/ bind(value, name = `binding${this._bindings.length}`) {
|
|
598
|
+
this._bindings.push({
|
|
599
|
+
name,
|
|
600
|
+
value
|
|
601
|
+
});
|
|
602
|
+
return name;
|
|
603
|
+
}
|
|
604
|
+
getBindings() {
|
|
605
|
+
return [
|
|
606
|
+
...this._bindings
|
|
607
|
+
];
|
|
608
|
+
}
|
|
581
609
|
toString() {
|
|
582
610
|
return this._lines.map((line)=>typeof line === 'string' ? this.indent(line) : line.toString()).join('\n\n');
|
|
583
611
|
}
|
|
@@ -912,6 +940,8 @@ class IdSet {
|
|
|
912
940
|
|
|
913
941
|
// EXTERNAL MODULE: ./src/schema/types.ts
|
|
914
942
|
var types = __webpack_require__(537);
|
|
943
|
+
// EXTERNAL MODULE: ./src/schema/utils/storageDates.ts
|
|
944
|
+
var storageDates = __webpack_require__(894);
|
|
915
945
|
// EXTERNAL MODULE: ./src/results/Result.ts
|
|
916
946
|
var Result = __webpack_require__(718);
|
|
917
947
|
// EXTERNAL MODULE: ./src/utilities/uuid.ts
|
|
@@ -977,29 +1007,17 @@ class MemoryDataCollection {
|
|
|
977
1007
|
}
|
|
978
1008
|
throw new Error(`Id Property '${property.name}' must be string or number, found '${property.type}'`);
|
|
979
1009
|
}
|
|
980
|
-
_dateColumns;
|
|
981
|
-
/** Date columns, by the name a stored record uses. Nested dates live inside a JSON column. */ get dateColumns() {
|
|
982
|
-
if (this._dateColumns == null) {
|
|
983
|
-
this._dateColumns = this.schema.properties.filter((property)=>property.type === types/* .SchemaTypes.Date */.L.Date && property.getAssignmentPath().includes(".") === false).map((property)=>property.getResolvedName());
|
|
984
|
-
}
|
|
985
|
-
return this._dateColumns;
|
|
986
|
-
}
|
|
987
1010
|
/**
|
|
988
1011
|
* The record this collection keeps.
|
|
989
1012
|
*
|
|
990
1013
|
* A copy, so a caller holding the entity cannot write into the store afterwards. Dates are held
|
|
991
|
-
* as Dates: a predicate compares a Date, and a stored ISO
|
|
1014
|
+
* as Dates, at the root, in objects and in arrays: a predicate compares a Date, and a stored ISO
|
|
1015
|
+
* string never matches one. A durable subclass hydrates parsed JSON through here too.
|
|
992
1016
|
*/ toStored(item) {
|
|
993
|
-
const columns = this.dateColumns;
|
|
994
1017
|
const stored = {
|
|
995
1018
|
...item
|
|
996
1019
|
};
|
|
997
|
-
|
|
998
|
-
const value = stored[columns[i]];
|
|
999
|
-
if (typeof value === "string") {
|
|
1000
|
-
stored[columns[i]] = new Date(value);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1020
|
+
(0,storageDates/* .getStorageDateReviver */.T)(this.schema)?.(stored);
|
|
1003
1021
|
return stored;
|
|
1004
1022
|
}
|
|
1005
1023
|
seed(items) {
|
|
@@ -1805,6 +1823,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1805
1823
|
LU: () => (/* reexport safe */ _utils__rspack_import_5.LU),
|
|
1806
1824
|
MY: () => (/* reexport safe */ _parser__rspack_import_3.MY),
|
|
1807
1825
|
Nb: () => (/* reexport safe */ _callSource__rspack_import_0.N),
|
|
1826
|
+
Pl: () => (/* reexport safe */ _parser__rspack_import_3.Pl),
|
|
1808
1827
|
SC: () => (/* reexport safe */ _types__rspack_import_4.SC),
|
|
1809
1828
|
Sm: () => (/* reexport safe */ _types__rspack_import_4.Sm),
|
|
1810
1829
|
Sv: () => (/* reexport safe */ _fold__rspack_import_2.Sv),
|
|
@@ -1845,6 +1864,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1845
1864
|
91(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1846
1865
|
__webpack_require__.d(__webpack_exports__, {
|
|
1847
1866
|
MY: () => (toExpression),
|
|
1867
|
+
Pl: () => (parseSelector),
|
|
1848
1868
|
oH: () => (parseFragment),
|
|
1849
1869
|
pg: () => (combineExpressions)
|
|
1850
1870
|
});
|
|
@@ -1853,6 +1873,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1853
1873
|
/* import */ var _schema__rspack_import_2 = __webpack_require__(537);
|
|
1854
1874
|
/* import */ var _evaluate__rspack_import_3 = __webpack_require__(379);
|
|
1855
1875
|
/* import */ var _fold__rspack_import_4 = __webpack_require__(43);
|
|
1876
|
+
/* import */ var _utils__rspack_import_6 = __webpack_require__(63);
|
|
1856
1877
|
/* import */ var _types__rspack_import_1 = __webpack_require__(27);
|
|
1857
1878
|
|
|
1858
1879
|
|
|
@@ -1860,6 +1881,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1860
1881
|
|
|
1861
1882
|
|
|
1862
1883
|
|
|
1884
|
+
|
|
1863
1885
|
// Error message constants
|
|
1864
1886
|
const ERROR_MESSAGES = {
|
|
1865
1887
|
PROPERTY_NOT_FOUND: (path)=>`Error parsing query, could not find PropertyInfo for path: ${path}`,
|
|
@@ -2467,6 +2489,9 @@ const COALESCE_OPERATORS = sourceKeyed({
|
|
|
2467
2489
|
// A comparison always names a schema property, so the condition alone settles it
|
|
2468
2490
|
return true;
|
|
2469
2491
|
}
|
|
2492
|
+
if (operand.kind === "opaque") {
|
|
2493
|
+
return operand.reads.some(containsProperty);
|
|
2494
|
+
}
|
|
2470
2495
|
return operand.kind === "arithmetic" && (containsProperty(operand.left) || containsProperty(operand.right) || operand.extra != null && containsProperty(operand.extra));
|
|
2471
2496
|
};
|
|
2472
2497
|
const DECLARATION_KEYWORDS = new Set([
|
|
@@ -2644,13 +2669,18 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
2644
2669
|
scope;
|
|
2645
2670
|
paramsName;
|
|
2646
2671
|
params;
|
|
2672
|
+
/**
|
|
2673
|
+
* Whether this parses a value selector rather than a filter, and so reads a call it has no node for
|
|
2674
|
+
* as an `OpaqueOperand` instead of refusing it.
|
|
2675
|
+
*/ readsValues;
|
|
2647
2676
|
/** Set when a param value shaped the tree itself (e.g. x[p.name]) — such templates cannot be cached. */ structurallyDependsOnParams = false;
|
|
2648
|
-
constructor(schema, stream, scope, paramsName, params){
|
|
2677
|
+
constructor(schema, stream, scope, paramsName, params, readsValues = false){
|
|
2649
2678
|
this.schema = schema;
|
|
2650
2679
|
this.stream = stream;
|
|
2651
2680
|
this.scope = scope;
|
|
2652
2681
|
this.paramsName = paramsName;
|
|
2653
2682
|
this.params = params;
|
|
2683
|
+
this.readsValues = readsValues;
|
|
2654
2684
|
}
|
|
2655
2685
|
parse() {
|
|
2656
2686
|
const expression = this.parseOr();
|
|
@@ -2672,6 +2702,71 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
2672
2702
|
}
|
|
2673
2703
|
return answer;
|
|
2674
2704
|
}
|
|
2705
|
+
/**
|
|
2706
|
+
* What a value selector returns: one value, or the fields of an object literal.
|
|
2707
|
+
*
|
|
2708
|
+
* A block body is read only when it does nothing but return, which is what a transpiler makes of an
|
|
2709
|
+
* arrow function. Anything more is refused, and the caller falls back to running the function.
|
|
2710
|
+
*/ parseSelector() {
|
|
2711
|
+
const block = this.stream.matchPunctuation("{");
|
|
2712
|
+
if (block) {
|
|
2713
|
+
const keyword = this.stream.next();
|
|
2714
|
+
if (keyword.kind !== "identifier" || keyword.value !== "return") {
|
|
2715
|
+
throw new Error(ERROR_MESSAGES.UNSUPPORTED("a selector block that does more than return"));
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
const selected = this.stream.isPunctuation("{") ? this.parseObjectLiteral() : this.stream.isPunctuation("(") && this.stream.isPunctuation("{", 1) ? this.parseBracketedObjectLiteral() : this.parseInterpolation();
|
|
2719
|
+
if (block) {
|
|
2720
|
+
this.stream.matchPunctuation(";");
|
|
2721
|
+
this.stream.expectPunctuation("}");
|
|
2722
|
+
}
|
|
2723
|
+
if (!this.stream.isAtEnd) {
|
|
2724
|
+
throw new Error(ERROR_MESSAGES.UNSUPPORTED(`unexpected token '${this.stream.peek()?.value}'`));
|
|
2725
|
+
}
|
|
2726
|
+
return selected;
|
|
2727
|
+
}
|
|
2728
|
+
/** `({ … })`, the arrow body that returns an object. */ parseBracketedObjectLiteral() {
|
|
2729
|
+
this.stream.expectPunctuation("(");
|
|
2730
|
+
const fields = this.parseObjectLiteral();
|
|
2731
|
+
this.stream.expectPunctuation(")");
|
|
2732
|
+
return fields;
|
|
2733
|
+
}
|
|
2734
|
+
/**
|
|
2735
|
+
* The fields of an object literal, each one value.
|
|
2736
|
+
*
|
|
2737
|
+
* A field's value is read without a top-level conditional, which needs brackets here: the look-ahead
|
|
2738
|
+
* for a `?` does not stop at the comma that ends the field.
|
|
2739
|
+
*/ parseObjectLiteral() {
|
|
2740
|
+
this.stream.expectPunctuation("{");
|
|
2741
|
+
const fields = [];
|
|
2742
|
+
while(!this.stream.matchPunctuation("}")){
|
|
2743
|
+
const key = this.stream.next();
|
|
2744
|
+
if (key.kind !== "identifier" && key.kind !== "string") {
|
|
2745
|
+
throw new Error(ERROR_MESSAGES.UNSUPPORTED(`the object key '${key.value}'`));
|
|
2746
|
+
}
|
|
2747
|
+
fields.push({
|
|
2748
|
+
name: key.value,
|
|
2749
|
+
operand: this.stream.matchPunctuation(":") ? this.parseValue() : this.parseShorthand(key)
|
|
2750
|
+
});
|
|
2751
|
+
if (!this.stream.matchPunctuation(",")) {
|
|
2752
|
+
this.stream.expectPunctuation("}");
|
|
2753
|
+
break;
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
return fields;
|
|
2757
|
+
}
|
|
2758
|
+
/** `{ name }`, which reads what the parameter list bound `name` to. */ parseShorthand(key) {
|
|
2759
|
+
const binding = key.kind === "identifier" ? this.scope.get(key.value) : undefined;
|
|
2760
|
+
if (binding == null || binding.kind === "inlined") {
|
|
2761
|
+
throw new Error(ERROR_MESSAGES.VARIABLE_VALUE(key.value));
|
|
2762
|
+
}
|
|
2763
|
+
return this.parseChain({
|
|
2764
|
+
kind: binding.kind,
|
|
2765
|
+
path: [
|
|
2766
|
+
...binding.path
|
|
2767
|
+
]
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2675
2770
|
/** The expression a `{ … }` block answers with. */ parseBlock() {
|
|
2676
2771
|
this.stream.expectPunctuation("{");
|
|
2677
2772
|
const answer = this.parseStatements();
|
|
@@ -2935,7 +3030,7 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
2935
3030
|
* A structural dependence found inside propagates outward: the template it belongs to cannot be
|
|
2936
3031
|
* cached either.
|
|
2937
3032
|
*/ parseNested(source) {
|
|
2938
|
-
const nested = new ExpressionParser(this.schema, new TokenStream(tokenize(source)), this.scope, this.paramsName, this.params);
|
|
3033
|
+
const nested = new ExpressionParser(this.schema, new TokenStream(tokenize(source)), this.scope, this.paramsName, this.params, this.readsValues);
|
|
2939
3034
|
const operand = nested.parseInterpolation();
|
|
2940
3035
|
// Leftover tokens mean the interpolation held something this reads only part of. Silently
|
|
2941
3036
|
// keeping the part it understood is the worst outcome available: `${x.age > 5 ? "a" : "b"}`
|
|
@@ -3227,7 +3322,7 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
3227
3322
|
if (argument.kind === "method-call") {
|
|
3228
3323
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED("nested method call inside .includes()"));
|
|
3229
3324
|
}
|
|
3230
|
-
if (argument.kind === "arithmetic" || argument.kind === "conditional") {
|
|
3325
|
+
if (argument.kind === "arithmetic" || argument.kind === "conditional" || argument.kind === "opaque") {
|
|
3231
3326
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED("arithmetic inside .includes()"));
|
|
3232
3327
|
}
|
|
3233
3328
|
return {
|
|
@@ -3321,7 +3416,7 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
3321
3416
|
if (argument.kind === "method-call") {
|
|
3322
3417
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED(`nested method call inside .${method}()`));
|
|
3323
3418
|
}
|
|
3324
|
-
if (argument.kind === "arithmetic" || argument.kind === "conditional") {
|
|
3419
|
+
if (argument.kind === "arithmetic" || argument.kind === "conditional" || argument.kind === "opaque") {
|
|
3325
3420
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED(`arithmetic inside .${method}()`));
|
|
3326
3421
|
}
|
|
3327
3422
|
return {
|
|
@@ -3331,9 +3426,20 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
3331
3426
|
argument
|
|
3332
3427
|
};
|
|
3333
3428
|
}
|
|
3429
|
+
if (this.readsValues) {
|
|
3430
|
+
return this.withGroupCall(this.opaqueCall(this.resolveChain(options.kind, path, transformer, locale)));
|
|
3431
|
+
}
|
|
3334
3432
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED(`method '.${method}()'`));
|
|
3335
3433
|
}
|
|
3336
3434
|
if (transformer != null) {
|
|
3435
|
+
if (this.readsValues) {
|
|
3436
|
+
return this.withGroupCall({
|
|
3437
|
+
kind: "opaque",
|
|
3438
|
+
reads: [
|
|
3439
|
+
this.resolveChain(options.kind, path, transformer, locale)
|
|
3440
|
+
]
|
|
3441
|
+
});
|
|
3442
|
+
}
|
|
3337
3443
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED("property access after a transform method"));
|
|
3338
3444
|
}
|
|
3339
3445
|
path.push(segment.value);
|
|
@@ -3478,10 +3584,39 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
3478
3584
|
argument
|
|
3479
3585
|
};
|
|
3480
3586
|
}
|
|
3587
|
+
// Any other member or call of a value, which a selector reads through
|
|
3588
|
+
if (this.readsValues) {
|
|
3589
|
+
this.stream.next();
|
|
3590
|
+
this.stream.next();
|
|
3591
|
+
receiver = this.stream.isPunctuation("(") ? this.opaqueCall(receiver) : {
|
|
3592
|
+
kind: "opaque",
|
|
3593
|
+
reads: [
|
|
3594
|
+
receiver
|
|
3595
|
+
]
|
|
3596
|
+
};
|
|
3597
|
+
continue;
|
|
3598
|
+
}
|
|
3481
3599
|
break;
|
|
3482
3600
|
}
|
|
3483
3601
|
return receiver;
|
|
3484
3602
|
}
|
|
3603
|
+
/** A call with no node of its own, from its `(`, kept for what its receiver and arguments read. */ opaqueCall(receiver) {
|
|
3604
|
+
const reads = [
|
|
3605
|
+
receiver
|
|
3606
|
+
];
|
|
3607
|
+
this.stream.expectPunctuation("(");
|
|
3608
|
+
while(!this.stream.matchPunctuation(")")){
|
|
3609
|
+
reads.push(this.parseValue());
|
|
3610
|
+
if (!this.stream.matchPunctuation(",")) {
|
|
3611
|
+
this.stream.expectPunctuation(")");
|
|
3612
|
+
break;
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
return {
|
|
3616
|
+
kind: "opaque",
|
|
3617
|
+
reads
|
|
3618
|
+
};
|
|
3619
|
+
}
|
|
3485
3620
|
withValueTransformer(operand) {
|
|
3486
3621
|
if (this.stream.isPunctuation(".")) {
|
|
3487
3622
|
const method = this.stream.peek(1);
|
|
@@ -3515,6 +3650,10 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
3515
3650
|
if (right.kind === "method-call") {
|
|
3516
3651
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED("method call on the right side of a comparison"));
|
|
3517
3652
|
}
|
|
3653
|
+
// A comparison is a tree a backend renders, and this operand has no node in one
|
|
3654
|
+
if (left.kind === "opaque" || right.kind === "opaque") {
|
|
3655
|
+
throw new Error(ERROR_MESSAGES.UNSUPPORTED("a call with no expression form inside a comparison"));
|
|
3656
|
+
}
|
|
3518
3657
|
if (needsBrackets(left) || needsBrackets(right)) {
|
|
3519
3658
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED("a bitwise or nullish operator compared without brackets, which JavaScript reads the other way round"));
|
|
3520
3659
|
}
|
|
@@ -3728,6 +3867,9 @@ const resolveParamPath = (paramsName, path, data)=>{
|
|
|
3728
3867
|
if (operand.kind === "method-call") {
|
|
3729
3868
|
throw new Error(ERROR_MESSAGES.UNSUPPORTED("a method call inside arithmetic"));
|
|
3730
3869
|
}
|
|
3870
|
+
if (operand.kind === "opaque") {
|
|
3871
|
+
throw new Error(ERROR_MESSAGES.UNSUPPORTED("a call with no expression form inside arithmetic"));
|
|
3872
|
+
}
|
|
3731
3873
|
return this.createValueExpression(operand, null, /* applyConverter */ false);
|
|
3732
3874
|
}
|
|
3733
3875
|
createPropertyExpression(operand) {
|
|
@@ -4063,6 +4205,104 @@ const toExpression = (schema, fn, params)=>{
|
|
|
4063
4205
|
return _types__rspack_import_1/* .Expression.notParsable */.r4.notParsable(refusalOf(error));
|
|
4064
4206
|
}
|
|
4065
4207
|
};
|
|
4208
|
+
const collectReads = (operand, into)=>{
|
|
4209
|
+
switch(operand.kind){
|
|
4210
|
+
case "property":
|
|
4211
|
+
into.add(operand.property);
|
|
4212
|
+
return;
|
|
4213
|
+
case "method-call":
|
|
4214
|
+
collectReads(operand.target, into);
|
|
4215
|
+
collectReads(operand.argument, into);
|
|
4216
|
+
return;
|
|
4217
|
+
case "arithmetic":
|
|
4218
|
+
collectReads(operand.left, into);
|
|
4219
|
+
collectReads(operand.right, into);
|
|
4220
|
+
if (operand.extra != null) {
|
|
4221
|
+
collectReads(operand.extra, into);
|
|
4222
|
+
}
|
|
4223
|
+
return;
|
|
4224
|
+
case "conditional":
|
|
4225
|
+
for (const property of (0,_utils__rspack_import_6/* .getProperties */.oY)(operand.condition)){
|
|
4226
|
+
into.add(property);
|
|
4227
|
+
}
|
|
4228
|
+
collectReads(operand.whenTrue, into);
|
|
4229
|
+
collectReads(operand.whenFalse, into);
|
|
4230
|
+
return;
|
|
4231
|
+
case "opaque":
|
|
4232
|
+
for (const read of operand.reads){
|
|
4233
|
+
collectReads(read, into);
|
|
4234
|
+
}
|
|
4235
|
+
return;
|
|
4236
|
+
}
|
|
4237
|
+
};
|
|
4238
|
+
const selectedValue = (operand)=>{
|
|
4239
|
+
const found = new Set();
|
|
4240
|
+
collectReads(operand, found);
|
|
4241
|
+
const reads = [
|
|
4242
|
+
...found
|
|
4243
|
+
];
|
|
4244
|
+
return {
|
|
4245
|
+
property: reads.length === 1 ? reads[0] : null,
|
|
4246
|
+
reads,
|
|
4247
|
+
isDirectProperty: operand.kind === "property" && operand.transformer == null
|
|
4248
|
+
};
|
|
4249
|
+
};
|
|
4250
|
+
// Keyed like the template cache. A selector takes no params, so every result is cacheable
|
|
4251
|
+
const selectorCache = new WeakMap();
|
|
4252
|
+
/**
|
|
4253
|
+
* Reads a sort, map, group or `nearest` selector with the grammar filters use, for what its value is
|
|
4254
|
+
* read from.
|
|
4255
|
+
*
|
|
4256
|
+
* Not for evaluating it: the caller's function stays the value, and nothing here renders one. A plugin
|
|
4257
|
+
* decides from the result whether it can run the option. One that orders or projects by column cannot
|
|
4258
|
+
* run a value that is not the property itself, and one that runs the function over stored rows cannot
|
|
4259
|
+
* run it over a renamed property.
|
|
4260
|
+
*
|
|
4261
|
+
* So the grammar is wider here than for a filter. A call it has no node for, such as `getFullYear()`,
|
|
4262
|
+
* is kept for the operands it reads rather than refused, since the function it came from still runs.
|
|
4263
|
+
*
|
|
4264
|
+
* `not-parsable` is not logged. The option runs as it did before the selector was parsed.
|
|
4265
|
+
*
|
|
4266
|
+
* Cached by function source per schema, like `toExpression`. The result is shared, so it is read-only.
|
|
4267
|
+
*/ const parseSelector = (schema, selector)=>{
|
|
4268
|
+
const source = selector.toString();
|
|
4269
|
+
let bySource = selectorCache.get(schema);
|
|
4270
|
+
const cached = bySource?.get(source);
|
|
4271
|
+
if (cached != null) {
|
|
4272
|
+
return cached;
|
|
4273
|
+
}
|
|
4274
|
+
let parsed;
|
|
4275
|
+
try {
|
|
4276
|
+
const shape = resolveFunctionShape(source, false);
|
|
4277
|
+
const parser = new ExpressionParser(schema, new TokenStream(tokenize(shape.body)), shape.scope, null, undefined, true);
|
|
4278
|
+
const selected = parser.parseSelector();
|
|
4279
|
+
parsed = Array.isArray(selected) ? {
|
|
4280
|
+
kind: "object",
|
|
4281
|
+
fields: selected.map((field)=>({
|
|
4282
|
+
name: field.name,
|
|
4283
|
+
...selectedValue(field.operand)
|
|
4284
|
+
}))
|
|
4285
|
+
} : {
|
|
4286
|
+
kind: "value",
|
|
4287
|
+
value: selectedValue(selected)
|
|
4288
|
+
};
|
|
4289
|
+
} catch (error) {
|
|
4290
|
+
parsed = {
|
|
4291
|
+
kind: "not-parsable",
|
|
4292
|
+
reason: refusalOf(error)
|
|
4293
|
+
};
|
|
4294
|
+
}
|
|
4295
|
+
if (bySource == null) {
|
|
4296
|
+
bySource = new Map();
|
|
4297
|
+
selectorCache.set(schema, bySource);
|
|
4298
|
+
}
|
|
4299
|
+
// Stryker disable next-line all: the same resource bound as the template cache's
|
|
4300
|
+
if (bySource.size >= MAX_CACHED_TEMPLATES_PER_SCHEMA) {
|
|
4301
|
+
bySource.clear();
|
|
4302
|
+
}
|
|
4303
|
+
bySource.set(source, parsed);
|
|
4304
|
+
return parsed;
|
|
4305
|
+
}; // #endregion
|
|
4066
4306
|
|
|
4067
4307
|
|
|
4068
4308
|
},
|
|
@@ -4799,7 +5039,7 @@ var TrampolinePipeline = __webpack_require__(416);
|
|
|
4799
5039
|
|
|
4800
5040
|
|
|
4801
5041
|
},
|
|
4802
|
-
|
|
5042
|
+
756(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4803
5043
|
|
|
4804
5044
|
// EXPORTS
|
|
4805
5045
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -4828,9 +5068,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4828
5068
|
QB: () => (/* reexport */ RetryDbPlugin),
|
|
4829
5069
|
m6: () => (/* reexport */ executeJoin),
|
|
4830
5070
|
i1: () => (/* reexport */ parameteriseDocument),
|
|
4831
|
-
|
|
5071
|
+
wk: () => (/* reexport */ reportRenamedProperties),
|
|
4832
5072
|
VW: () => (/* reexport */ applyInnerOptions),
|
|
4833
5073
|
B2: () => (/* reexport */ describeUnparsableFilter),
|
|
5074
|
+
__: () => (/* reexport */ toEntityShape),
|
|
4834
5075
|
Jd: () => (/* reexport */ EphemeralDataPlugin),
|
|
4835
5076
|
Pl: () => (/* reexport */ deserializePersistResult),
|
|
4836
5077
|
JF: () => (/* reexport */ DataTranslator),
|
|
@@ -5821,9 +6062,12 @@ class JsonTranslator extends DataTranslator {
|
|
|
5821
6062
|
}
|
|
5822
6063
|
}
|
|
5823
6064
|
|
|
6065
|
+
// EXTERNAL MODULE: ./src/schema/utils/storageDates.ts
|
|
6066
|
+
var storageDates = __webpack_require__(894);
|
|
5824
6067
|
;// CONCATENATED MODULE: ./src/plugins/translators/SqlTranslator.ts
|
|
5825
6068
|
|
|
5826
6069
|
|
|
6070
|
+
|
|
5827
6071
|
/**
|
|
5828
6072
|
* A stored vector as a list of numbers, whatever the driver handed back.
|
|
5829
6073
|
*
|
|
@@ -5852,6 +6096,31 @@ class SqlTranslator extends DataTranslator {
|
|
|
5852
6096
|
super(query);
|
|
5853
6097
|
this.pushedDown = pushedDown;
|
|
5854
6098
|
}
|
|
6099
|
+
/**
|
|
6100
|
+
* Dates back as Dates, before the caller's selectors run over the rows.
|
|
6101
|
+
*
|
|
6102
|
+
* A `group` key and a `map` are the caller's lambdas, run here over rows as the engine returned them.
|
|
6103
|
+
* SQLite, D1 and libSQL hand a date back as the TEXT it was stored as, which has no `getFullYear()`
|
|
6104
|
+
* and groups apart from the Date the entity holds. Revived at storage paths and in place, which the
|
|
6105
|
+
* datastore's deserialization still reads, and after `decodeJsonColumns`, so a date inside a JSON
|
|
6106
|
+
* column is revived too. Only a string is converted, so an engine that returns a Date (PostgreSQL,
|
|
6107
|
+
* PGlite, MySQL) is left alone, and so is a row already revived.
|
|
6108
|
+
*
|
|
6109
|
+
* Not a joined statement's rows, which are tuples, each half already deserialized. Nor rows whose
|
|
6110
|
+
* `group` or `map` was handed back, which the datastore runs after deserializing them.
|
|
6111
|
+
*/ translate(data) {
|
|
6112
|
+
const runsHere = (name)=>this.query.options.get(name).some((item)=>item.option.target === "database" && item.option.reason === "executed");
|
|
6113
|
+
if (this.pushedDown.join !== true && this.query.schema != null && Array.isArray(data) && (runsHere("group") || runsHere("map"))) {
|
|
6114
|
+
const reviveDates = (0,storageDates/* .getStorageDateReviver */.T)(this.query.schema);
|
|
6115
|
+
for(let i = 0, length = reviveDates == null ? 0 : data.length; i < length; i++){
|
|
6116
|
+
const row = data[i];
|
|
6117
|
+
if (row != null && typeof row === "object") {
|
|
6118
|
+
reviveDates(row);
|
|
6119
|
+
}
|
|
6120
|
+
}
|
|
6121
|
+
}
|
|
6122
|
+
return super.translate(data);
|
|
6123
|
+
}
|
|
5855
6124
|
count(data, _) {
|
|
5856
6125
|
if (Array.isArray(data) && data.length > 0) {
|
|
5857
6126
|
// Count is returned as the property alias on the query.
|
|
@@ -6303,7 +6572,6 @@ const isParameter = (value)=>typeof value === "object" && value !== null && PARA
|
|
|
6303
6572
|
*/ const MEMORY_EXECUTION_EXPLANATIONS = {
|
|
6304
6573
|
"not-parsable": "A filter could not be parsed into an expression tree, so it and every option after it run in memory.",
|
|
6305
6574
|
"unmapped-property": "The property is not stored in the database, so it can only be read after deserialization.",
|
|
6306
|
-
"renamed-property": "The property is stored under a different name, and selectors use the in-memory name, so it can only be read after deserialization.",
|
|
6307
6575
|
"map-rename": "A map renames or drops properties, so every option after it refers to names the database does not have.",
|
|
6308
6576
|
"after-nearest": "A similarity search orders and limits rows, and the plugin cannot report whether it performed the search, so every option after it runs in memory.",
|
|
6309
6577
|
"after-join": "A join produces [outer, inner] tuples rather than entities, and the plugin cannot report how it joined, so every option after it runs in memory.",
|
|
@@ -6805,6 +7073,80 @@ const formatStep = (step, lines)=>{
|
|
|
6805
7073
|
return lines.join("\n");
|
|
6806
7074
|
};
|
|
6807
7075
|
|
|
7076
|
+
// EXTERNAL MODULE: ./src/expressions/utils.ts
|
|
7077
|
+
var utils = __webpack_require__(63);
|
|
7078
|
+
;// CONCATENATED MODULE: ./src/plugins/query/renames.ts
|
|
7079
|
+
|
|
7080
|
+
|
|
7081
|
+
const PROPERTY_READING_OPTIONS = [
|
|
7082
|
+
"filter",
|
|
7083
|
+
"sort",
|
|
7084
|
+
"nearest",
|
|
7085
|
+
"map",
|
|
7086
|
+
"group"
|
|
7087
|
+
];
|
|
7088
|
+
const namesRenamedProperty = (expression)=>{
|
|
7089
|
+
let found = false;
|
|
7090
|
+
if (expression == null) {
|
|
7091
|
+
return found;
|
|
7092
|
+
}
|
|
7093
|
+
(0,utils/* .forEach */.jJ)(expression, (node)=>{
|
|
7094
|
+
if ((0,assertions/* .isPropertyExpression */.e3)(node) && node.property.hasRenamedSegments) {
|
|
7095
|
+
found = true;
|
|
7096
|
+
return false;
|
|
7097
|
+
}
|
|
7098
|
+
return true;
|
|
7099
|
+
});
|
|
7100
|
+
return found;
|
|
7101
|
+
};
|
|
7102
|
+
const isRenamed = (property)=>property != null && property.hasRenamedSegments;
|
|
7103
|
+
/**
|
|
7104
|
+
* Whether a selector's value is read from a renamed property, whether it is that property or computed
|
|
7105
|
+
* from it: `r => r.dueDate.getTime()` reads `dueDate` all the same. Every property it reads when the
|
|
7106
|
+
* selector was parsed, and otherwise the property recorded for it.
|
|
7107
|
+
*/ const readsRenamedValue = (value)=>value != null && (value.reads != null ? value.reads.some(isRenamed) : isRenamed(value.property));
|
|
7108
|
+
const readsRenamedField = (fields)=>fields != null && fields.some(readsRenamedValue);
|
|
7109
|
+
const readsRenamedProperty = (name, value)=>{
|
|
7110
|
+
switch(name){
|
|
7111
|
+
case "filter":
|
|
7112
|
+
return namesRenamedProperty(value.expression);
|
|
7113
|
+
case "map":
|
|
7114
|
+
// A projection reads each field it selects
|
|
7115
|
+
return readsRenamedField(value.fields);
|
|
7116
|
+
case "group":
|
|
7117
|
+
// A group reads its key, then copies every field of the row into its members: every schema
|
|
7118
|
+
// property, or what a `map` before it selected
|
|
7119
|
+
return readsRenamedValue(value.key) || readsRenamedField(value.fields);
|
|
7120
|
+
default:
|
|
7121
|
+
return readsRenamedValue(value);
|
|
7122
|
+
}
|
|
7123
|
+
};
|
|
7124
|
+
/**
|
|
7125
|
+
* Hands back every option over a property stored under a `.from()` name, for the datastore to run
|
|
7126
|
+
* in memory.
|
|
7127
|
+
*
|
|
7128
|
+
* Core keeps such an option with the database, because only the plugin knows whether its backend
|
|
7129
|
+
* reads storage names. One that translates the option — SQL renders the column from
|
|
7130
|
+
* `getResolvedName()` — needs nothing from here. One that runs the caller's lambda over rows as it
|
|
7131
|
+
* stores them reads a key the row does not have, and answers wrongly without an error: that plugin
|
|
7132
|
+
* calls this before it reads anything, and the datastore finishes the query after deserialization,
|
|
7133
|
+
* where the in-memory names exist.
|
|
7134
|
+
*
|
|
7135
|
+
* Reported as `missing-capability`: the backend cannot express the option as written, and like
|
|
7136
|
+
* every capability, that is only knowable by the plugin.
|
|
7137
|
+
*
|
|
7138
|
+
* @param names Which options to check, for a plugin that resolves some of them itself — Mongo renders
|
|
7139
|
+
* filters and sorts through the stored path, and runs `nearest`, `map` and `group` in JavaScript.
|
|
7140
|
+
*/ const reportRenamedProperties = (options, names = PROPERTY_READING_OPTIONS)=>{
|
|
7141
|
+
for (const name of names){
|
|
7142
|
+
for (const item of options.get(name)){
|
|
7143
|
+
if (readsRenamedProperty(name, item.option.value)) {
|
|
7144
|
+
options.reportMissingCapability(item);
|
|
7145
|
+
}
|
|
7146
|
+
}
|
|
7147
|
+
}
|
|
7148
|
+
};
|
|
7149
|
+
|
|
6808
7150
|
;// CONCATENATED MODULE: ./src/plugins/query/types.ts
|
|
6809
7151
|
var types_QueryOrdering = /*#__PURE__*/ function(QueryOrdering) {
|
|
6810
7152
|
QueryOrdering["Descending"] = "desc";
|
|
@@ -6822,6 +7164,7 @@ var types_QueryOrdering = /*#__PURE__*/ function(QueryOrdering) {
|
|
|
6822
7164
|
|
|
6823
7165
|
|
|
6824
7166
|
|
|
7167
|
+
|
|
6825
7168
|
// EXTERNAL MODULE: ./src/expressions/evaluate.ts
|
|
6826
7169
|
var evaluate = __webpack_require__(379);
|
|
6827
7170
|
// EXTERNAL MODULE: ./src/expressions/fold.ts
|
|
@@ -6835,6 +7178,9 @@ var fold = __webpack_require__(43);
|
|
|
6835
7178
|
* Everything except `map` and `group`. Those two are defined BY a closure — the projection is the
|
|
6836
7179
|
* option — and no data form of them exists to send. Nothing else needs its closure: a sort is a
|
|
6837
7180
|
* property and a direction, a filter is an expression tree, `nearest` is a vector and a count.
|
|
7181
|
+
*
|
|
7182
|
+
* Except a sort or `nearest` whose selector computes its value, such as `x => x.name.length`. It is sent
|
|
7183
|
+
* as the property it reads, and the receiver would order by that instead. See `isSendable`.
|
|
6838
7184
|
*/ const SENDABLE = new Set([
|
|
6839
7185
|
"skip",
|
|
6840
7186
|
"take",
|
|
@@ -6848,6 +7194,7 @@ var fold = __webpack_require__(43);
|
|
|
6848
7194
|
"sum",
|
|
6849
7195
|
"distinct"
|
|
6850
7196
|
]);
|
|
7197
|
+
const isSendable = (name, value)=>SENDABLE.has(name) && (name !== "sort" && name !== "nearest" || value.isDirectProperty !== false);
|
|
6851
7198
|
/**
|
|
6852
7199
|
* Splits options into the PREFIX that can be sent and the remainder that cannot.
|
|
6853
7200
|
*
|
|
@@ -6863,7 +7210,12 @@ var fold = __webpack_require__(43);
|
|
|
6863
7210
|
const local = new QueryOptionsCollection/* .QueryOptionsCollection */.H();
|
|
6864
7211
|
let stopped = false;
|
|
6865
7212
|
options.forEach((option)=>{
|
|
6866
|
-
|
|
7213
|
+
// Reported by the plugin, so it belongs to the datastore, and so does everything after it —
|
|
7214
|
+
// a report cascades to the end of the database phase, which keeps what is left a prefix
|
|
7215
|
+
if (option.target === "database" && option.reason !== "executed") {
|
|
7216
|
+
return;
|
|
7217
|
+
}
|
|
7218
|
+
if (stopped === false && isSendable(option.name, option.value) === false) {
|
|
6867
7219
|
stopped = true;
|
|
6868
7220
|
}
|
|
6869
7221
|
(stopped ? local : sendable).add(option.name, option.value);
|
|
@@ -7730,6 +8082,15 @@ class EphemeralDataPlugin {
|
|
|
7730
8082
|
*/ get databaseName() {
|
|
7731
8083
|
return this._databaseName;
|
|
7732
8084
|
}
|
|
8085
|
+
/**
|
|
8086
|
+
* Whether the records this plugin holds are in storage shape, keyed by `from` names.
|
|
8087
|
+
*
|
|
8088
|
+
* True for every store of what the datastore serialized, which is why a renamed property is
|
|
8089
|
+
* reported and records are cloned and keyed by their storage names. The datastore's change probe
|
|
8090
|
+
* holds rows the broadcast has already deserialized, so it reads them by in-memory names instead.
|
|
8091
|
+
*/ get holdsStorageShape() {
|
|
8092
|
+
return true;
|
|
8093
|
+
}
|
|
7733
8094
|
/**
|
|
7734
8095
|
* All-or-nothing across every collection in the save.
|
|
7735
8096
|
*
|
|
@@ -7937,7 +8298,9 @@ class EphemeralDataPlugin {
|
|
|
7937
8298
|
* join discards the surplus. Same pairs either way.
|
|
7938
8299
|
*/ resolveJoinInnerSide(event, outerKeys, done) {
|
|
7939
8300
|
const joinOption = event.operation.options.getLast("join");
|
|
7940
|
-
|
|
8301
|
+
// Not reached when an option before it was reported: the datastore's own join branch pairs
|
|
8302
|
+
// the rows this read returns.
|
|
8303
|
+
if (joinOption == null || joinOption.reason !== "executed") {
|
|
7941
8304
|
done({
|
|
7942
8305
|
ok: "success"
|
|
7943
8306
|
});
|
|
@@ -7964,7 +8327,7 @@ class EphemeralDataPlugin {
|
|
|
7964
8327
|
const innerRows = [];
|
|
7965
8328
|
// Records are held in STORAGE shape, so the key is read by its resolved column name.
|
|
7966
8329
|
const innerKey = joinOption.value.innerKey;
|
|
7967
|
-
const keyColumn = innerKey.property?.getResolvedName() ?? innerKey.propertyName;
|
|
8330
|
+
const keyColumn = this.holdsStorageShape ? innerKey.property?.getResolvedName() ?? innerKey.propertyName : innerKey.propertyName;
|
|
7968
8331
|
for (const record of innerCollection.values()){
|
|
7969
8332
|
if (outerKeys != null && outerKeys.has(record[keyColumn]) === false) {
|
|
7970
8333
|
continue;
|
|
@@ -7993,7 +8356,7 @@ class EphemeralDataPlugin {
|
|
|
7993
8356
|
* to fall back to `structuredClone`, which is roughly an order of magnitude slower and was paid
|
|
7994
8357
|
* on EVERY read of EVERY schema that renames a property.
|
|
7995
8358
|
*/ recordCloner(schema) {
|
|
7996
|
-
const hasRenamedProperties = schema.properties.some((property)=>property.from != null);
|
|
8359
|
+
const hasRenamedProperties = this.holdsStorageShape && schema.properties.some((property)=>property.from != null);
|
|
7997
8360
|
return hasRenamedProperties ? schema.cloneStorage : schema.clone;
|
|
7998
8361
|
}
|
|
7999
8362
|
query(event, done) {
|
|
@@ -8005,6 +8368,12 @@ class EphemeralDataPlugin {
|
|
|
8005
8368
|
const schema = operation.schema;
|
|
8006
8369
|
const collection = this.resolveCollection(schema);
|
|
8007
8370
|
const cloneRecord = this.recordCloner(schema);
|
|
8371
|
+
// Records are held in storage shape and every option below runs the caller's lambda
|
|
8372
|
+
// over them, so a `from` property is read by a name the record does not have. Handed
|
|
8373
|
+
// back, and the datastore runs it after deserialization.
|
|
8374
|
+
if (this.holdsStorageShape) {
|
|
8375
|
+
reportRenamedProperties(operation.options);
|
|
8376
|
+
}
|
|
8008
8377
|
collection.load((r)=>{
|
|
8009
8378
|
if (r.ok === Result/* .Result.ERROR */.Q.ERROR) {
|
|
8010
8379
|
done(Result/* .PluginEventResult.error */.D.error(event.id, r.error));
|
|
@@ -8013,7 +8382,9 @@ class EphemeralDataPlugin {
|
|
|
8013
8382
|
const orderedOptions = [];
|
|
8014
8383
|
operation.options.forEach((o)=>orderedOptions.push(o));
|
|
8015
8384
|
let leadingFilterCount = 0;
|
|
8016
|
-
|
|
8385
|
+
// Stops at a reported filter too: the database phase ends there, and the datastore
|
|
8386
|
+
// runs it and everything after it.
|
|
8387
|
+
while(leadingFilterCount < orderedOptions.length && orderedOptions[leadingFilterCount].name === "filter" && orderedOptions[leadingFilterCount].reason === "executed"){
|
|
8017
8388
|
leadingFilterCount++;
|
|
8018
8389
|
}
|
|
8019
8390
|
// Key-equality fast path: when a leading filter's parsed expression pins
|
|
@@ -8091,14 +8462,14 @@ class EphemeralDataPlugin {
|
|
|
8091
8462
|
* that was never applied.
|
|
8092
8463
|
*
|
|
8093
8464
|
* Before the inner side, to match execution order.
|
|
8094
|
-
*/ const described = describeFilters(operation.options.get("filter").map((entry)=>entry.option.value));
|
|
8465
|
+
*/ const described = describeFilters(operation.options.get("filter").filter((entry)=>entry.option.reason === "executed").map((entry)=>entry.option.value));
|
|
8095
8466
|
event.executedQueries.push({
|
|
8096
8467
|
text: `${operation.schema.collectionName}: scanned ${cloned.length} in-memory ` + `${cloned.length === 1 ? "record" : "records"}, filter ${described.text}`,
|
|
8097
8468
|
parameters: described.parameters.length > 0 ? described.parameters : undefined
|
|
8098
8469
|
});
|
|
8099
8470
|
const joinOption = operation.options.getLast("join");
|
|
8100
|
-
const outerKeys = joinOption == null ? null : distinctJoinKeys(cloned, joinOption.value.outerKey, joinOption.value.semiJoinKeyThreshold, {
|
|
8101
|
-
storageShape:
|
|
8471
|
+
const outerKeys = joinOption == null || joinOption.reason !== "executed" ? null : distinctJoinKeys(cloned, joinOption.value.outerKey, joinOption.value.semiJoinKeyThreshold, {
|
|
8472
|
+
storageShape: this.holdsStorageShape
|
|
8102
8473
|
});
|
|
8103
8474
|
this.resolveJoinInnerSide(event, outerKeys, (joinResult)=>{
|
|
8104
8475
|
if (joinResult.ok === "error") {
|
|
@@ -8274,7 +8645,7 @@ class TelemetryDbPlugin {
|
|
|
8274
8645
|
*
|
|
8275
8646
|
* The clone is a real date and fails `instanceof Date`, which is what a caller checks. Mutated in
|
|
8276
8647
|
* place because the clone is already private to this call.
|
|
8277
|
-
*/ const
|
|
8648
|
+
*/ const CacheDbPlugin_reviveDates = (value)=>{
|
|
8278
8649
|
if (value == null || typeof value !== "object") {
|
|
8279
8650
|
return value;
|
|
8280
8651
|
}
|
|
@@ -8283,12 +8654,12 @@ class TelemetryDbPlugin {
|
|
|
8283
8654
|
}
|
|
8284
8655
|
if (Array.isArray(value)) {
|
|
8285
8656
|
for(let i = 0, length = value.length; i < length; i++){
|
|
8286
|
-
value[i] =
|
|
8657
|
+
value[i] = CacheDbPlugin_reviveDates(value[i]);
|
|
8287
8658
|
}
|
|
8288
8659
|
return value;
|
|
8289
8660
|
}
|
|
8290
8661
|
for (const key of Object.keys(value)){
|
|
8291
|
-
value[key] =
|
|
8662
|
+
value[key] = CacheDbPlugin_reviveDates(value[key]);
|
|
8292
8663
|
}
|
|
8293
8664
|
return value;
|
|
8294
8665
|
};
|
|
@@ -8330,7 +8701,7 @@ class CacheDbPlugin {
|
|
|
8330
8701
|
* the next update would be written UNCHECKED with no error anywhere.
|
|
8331
8702
|
* Pinned by `datastore/src/collections/wrapperStacking.test.ts`.
|
|
8332
8703
|
*/ rebuild(entry) {
|
|
8333
|
-
return new entry.construct(
|
|
8704
|
+
return new entry.construct(CacheDbPlugin_reviveDates(structuredClone(entry.value)), entry.isTransformed);
|
|
8334
8705
|
}
|
|
8335
8706
|
query(event, done) {
|
|
8336
8707
|
const key = this.keyFor(event);
|
|
@@ -8788,6 +9159,30 @@ const mismatchWarning = (expression)=>{
|
|
|
8788
9159
|
const outcome = expression.negated ? "every row matches" : "no row matches";
|
|
8789
9160
|
return `Routier: '${side.property.property.getAssignmentPath()}' is a ${side.expected}, and this filter ` + `compares it against ${describeLiteral(side.value.value)}, which is a ${typeof side.value.value}. ` + `A strict comparison between them is the same answer for every row, so ${outcome} and the filter ` + `runs in memory. https://routier.dev/guides/strict-comparison-types`;
|
|
8790
9161
|
};
|
|
9162
|
+
/**
|
|
9163
|
+
* An item as one dispatch receives it: a new object, so a report written on it stays with that dispatch.
|
|
9164
|
+
*
|
|
9165
|
+
* A database option starts `executed` again, because a report is only an answer from the plugin that
|
|
9166
|
+
* made it. A memory option keeps the reason core planned it with. A join's inner options are copied the
|
|
9167
|
+
* same way, since a plugin can report on them too.
|
|
9168
|
+
*/ const toDispatchItem = (item)=>{
|
|
9169
|
+
const option = item.option;
|
|
9170
|
+
const value = option.name === "join" ? {
|
|
9171
|
+
...option.value,
|
|
9172
|
+
innerOptions: option.value.innerOptions.forDispatch()
|
|
9173
|
+
} : option.value;
|
|
9174
|
+
return {
|
|
9175
|
+
index: item.index,
|
|
9176
|
+
option: option.target === "database" ? {
|
|
9177
|
+
...option,
|
|
9178
|
+
value,
|
|
9179
|
+
reason: "executed"
|
|
9180
|
+
} : {
|
|
9181
|
+
...option,
|
|
9182
|
+
value
|
|
9183
|
+
}
|
|
9184
|
+
};
|
|
9185
|
+
};
|
|
8791
9186
|
class QueryOptionsCollection {
|
|
8792
9187
|
options = new Map();
|
|
8793
9188
|
nextExecutionTarget = "database";
|
|
@@ -8826,7 +9221,7 @@ class QueryOptionsCollection {
|
|
|
8826
9221
|
}
|
|
8827
9222
|
}
|
|
8828
9223
|
if (name === "filter") {
|
|
8829
|
-
// Need to check for unmapped
|
|
9224
|
+
// Need to check for unmapped properties
|
|
8830
9225
|
const filterValue = value;
|
|
8831
9226
|
// A tautology (`x => true`) filters nothing — skip it entirely so
|
|
8832
9227
|
// plugins never see it
|
|
@@ -8843,14 +9238,10 @@ class QueryOptionsCollection {
|
|
|
8843
9238
|
this.cutOverToMemory("unmapped-property");
|
|
8844
9239
|
return false;
|
|
8845
9240
|
}
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
// where the in-memory names exist
|
|
8851
|
-
this.cutOverToMemory("renamed-property");
|
|
8852
|
-
return false;
|
|
8853
|
-
}
|
|
9241
|
+
// A renamed property stays with the database. Whether the backend can read a
|
|
9242
|
+
// `from` name is the plugin's to know, not this collection's: the property
|
|
9243
|
+
// travels with the option, and a plugin that cannot resolve it reports it
|
|
9244
|
+
// back — see `reportRenamedProperties`
|
|
8854
9245
|
if (comparesTypesThatCannotMatch(expression)) {
|
|
8855
9246
|
_utilities__rspack_import_3/* .logger.warn */.vF.warn(mismatchWarning(expression));
|
|
8856
9247
|
this.cutOverToMemory("predicate-error");
|
|
@@ -8862,26 +9253,19 @@ class QueryOptionsCollection {
|
|
|
8862
9253
|
}
|
|
8863
9254
|
if (name === "sort") {
|
|
8864
9255
|
const sortValue = value;
|
|
8865
|
-
// Same rule as filters:
|
|
8866
|
-
//
|
|
9256
|
+
// Same rule as filters: an unmapped property only exists after deserialization. A
|
|
9257
|
+
// renamed one stays with the database, for the plugin to resolve or report
|
|
8867
9258
|
if (sortValue.property != null && sortValue.property.isUnmapped) {
|
|
8868
9259
|
this.cutOverToMemory("unmapped-property");
|
|
8869
|
-
} else if (sortValue.property != null && sortValue.property.hasRenamedSegments) {
|
|
8870
|
-
this.cutOverToMemory("renamed-property");
|
|
8871
9260
|
}
|
|
8872
9261
|
}
|
|
8873
9262
|
if (name === "nearest") {
|
|
8874
9263
|
const nearestValue = value;
|
|
8875
|
-
// Same rule as sort, and for the same reason:
|
|
8876
|
-
//
|
|
8877
|
-
//
|
|
8878
|
-
//
|
|
8879
|
-
// This is also what lets every translator's in-memory fallback read the column by
|
|
8880
|
-
// its resolved name — anything whose storage name differs never reaches them.
|
|
9264
|
+
// Same rule as sort, and for the same reason: an unmapped property is not stored at
|
|
9265
|
+
// all, so it is only readable after deserialization, which is where memory execution
|
|
9266
|
+
// runs. A vector stored under a `from` name is the plugin's to resolve or report.
|
|
8881
9267
|
if (nearestValue.property != null && nearestValue.property.isUnmapped) {
|
|
8882
9268
|
this.cutOverToMemory("unmapped-property");
|
|
8883
|
-
} else if (nearestValue.property != null && nearestValue.property.hasRenamedSegments) {
|
|
8884
|
-
this.cutOverToMemory("renamed-property");
|
|
8885
9269
|
}
|
|
8886
9270
|
}
|
|
8887
9271
|
if ((name === "filter" || name === "sort") && (this.options.has("skip") || this.options.has("take"))) {
|
|
@@ -8988,6 +9372,9 @@ class QueryOptionsCollection {
|
|
|
8988
9372
|
* the shared collection before executing. Without restoring, a re-executed terminal —
|
|
8989
9373
|
* the whole point of a subscribed queryable — stacks its option a second time and
|
|
8990
9374
|
* runs it over the first execution's scalar result.
|
|
9375
|
+
*
|
|
9376
|
+
* The item objects are shared with the snapshot. Nothing reports on them, because every
|
|
9377
|
+
* dispatch sends a `forDispatch` copy, so a restore brings back no reports.
|
|
8991
9378
|
*/ snapshot() {
|
|
8992
9379
|
const options = new Map([
|
|
8993
9380
|
...this.options.entries()
|
|
@@ -9065,19 +9452,48 @@ class QueryOptionsCollection {
|
|
|
9065
9452
|
}
|
|
9066
9453
|
}
|
|
9067
9454
|
/**
|
|
9068
|
-
*
|
|
9455
|
+
* A copy of the collection for one dispatch to a plugin, with nothing reported on it.
|
|
9069
9456
|
*
|
|
9070
9457
|
* Capability is answered per dispatch, so a report is only an answer for the execution that
|
|
9071
|
-
* produced it.
|
|
9072
|
-
*
|
|
9073
|
-
*
|
|
9074
|
-
|
|
9458
|
+
* produced it. Reports are written onto items, and the items of a queryable's collection
|
|
9459
|
+
* outlive any one execution: a snapshot shares them, and a subscription dispatches the same
|
|
9460
|
+
* query on every change. A report left on them replays options the plugin did run on the
|
|
9461
|
+
* next execution, such as a `skip` applied twice over rows already windowed, or hands a
|
|
9462
|
+
* renamed filter to memory that the engine could have run.
|
|
9463
|
+
*
|
|
9464
|
+
* Each item keeps its index, name, value and target. A half from `split`/`splitAt` is copied
|
|
9465
|
+
* with a copy of its origin, and its items are that copy's items, so a report on the half still
|
|
9466
|
+
* cascades over the whole dispatch without reaching the collection it was copied from.
|
|
9467
|
+
*/ forDispatch() {
|
|
9468
|
+
if (this.origin == null) {
|
|
9469
|
+
return this.copyForDispatch().copy;
|
|
9470
|
+
}
|
|
9471
|
+
const { copy: root, copies } = this.origin.copyForDispatch();
|
|
9472
|
+
const half = new QueryOptionsCollection();
|
|
9075
9473
|
this.resolveEnumeration();
|
|
9076
9474
|
for (const item of this.enumeratedItems){
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9475
|
+
// An item added to the half after it was split has no counterpart in the origin
|
|
9476
|
+
half.adopt(copies.get(item) ?? toDispatchItem(item));
|
|
9477
|
+
}
|
|
9478
|
+
half.origin = root;
|
|
9479
|
+
return half;
|
|
9480
|
+
}
|
|
9481
|
+
copyForDispatch() {
|
|
9482
|
+
const copy = new QueryOptionsCollection();
|
|
9483
|
+
const copies = new Map();
|
|
9484
|
+
this.resolveEnumeration();
|
|
9485
|
+
for (const item of this.enumeratedItems){
|
|
9486
|
+
const copied = toDispatchItem(item);
|
|
9487
|
+
copies.set(item, copied);
|
|
9488
|
+
copy.adopt(copied);
|
|
9080
9489
|
}
|
|
9490
|
+
copy.nextExecutionTarget = this.nextExecutionTarget;
|
|
9491
|
+
copy.nextExecutionReason = this.nextExecutionReason;
|
|
9492
|
+
copy.nextIndex = this.nextIndex;
|
|
9493
|
+
return {
|
|
9494
|
+
copy,
|
|
9495
|
+
copies
|
|
9496
|
+
};
|
|
9081
9497
|
}
|
|
9082
9498
|
/** The options the database did not run, in the order they were written. */ notExecuted() {
|
|
9083
9499
|
this.resolveEnumeration();
|
|
@@ -9275,11 +9691,11 @@ function toPromise(fn) {
|
|
|
9275
9691
|
|
|
9276
9692
|
|
|
9277
9693
|
},
|
|
9278
|
-
|
|
9694
|
+
862(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
9279
9695
|
|
|
9280
9696
|
// EXPORTS
|
|
9281
9697
|
__webpack_require__.d(__webpack_exports__, {
|
|
9282
|
-
ly: () => (/* reexport */ isArrayValued),
|
|
9698
|
+
ly: () => (/* reexport */ propertyKind/* .isArrayValued */.l),
|
|
9283
9699
|
Qc: () => (/* reexport */ SchemaDate),
|
|
9284
9700
|
dF: () => (/* reexport */ SchemaDefinition),
|
|
9285
9701
|
VG: () => (/* reexport */ compiledSchemaToJsonSchema),
|
|
@@ -9290,7 +9706,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
9290
9706
|
qQ: () => (/* reexport */ SchemaIdentity),
|
|
9291
9707
|
_t: () => (/* reexport */ SchemaDistinct),
|
|
9292
9708
|
PG: () => (/* reexport */ SchemaNumber),
|
|
9293
|
-
LL: () => (/* reexport */ hasPrimitiveElements),
|
|
9709
|
+
LL: () => (/* reexport */ propertyKind/* .hasPrimitiveElements */.L),
|
|
9294
9710
|
IB: () => (/* reexport */ SchemaTracked),
|
|
9295
9711
|
L$: () => (/* reexport */ rehydrateSchemaFromJsonSchema),
|
|
9296
9712
|
CW: () => (/* reexport */ SchemaSerialize),
|
|
@@ -9306,10 +9722,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
9306
9722
|
w_: () => (/* reexport */ SchemaBoolean),
|
|
9307
9723
|
Od: () => (/* reexport */ extractTypeInfo),
|
|
9308
9724
|
r5: () => (/* reexport */ SchemaComputed),
|
|
9309
|
-
|
|
9725
|
+
TH: () => (/* reexport */ storageDates/* .getStorageDateReviver */.T),
|
|
9310
9726
|
XM: () => (/* reexport */ SchemaString),
|
|
9311
9727
|
Cg: () => (/* reexport */ SchemaFile),
|
|
9312
9728
|
FR: () => (/* reexport */ SchemaBase),
|
|
9729
|
+
UX: () => (/* reexport */ propertyInfoToJsonSchema),
|
|
9313
9730
|
s: () => (/* reexport */ s),
|
|
9314
9731
|
yV: () => (/* reexport */ SchemaTag),
|
|
9315
9732
|
ge: () => (/* reexport */ SchemaSearchable),
|
|
@@ -10524,78 +10941,9 @@ class SlotPath {
|
|
|
10524
10941
|
|
|
10525
10942
|
// EXTERNAL MODULE: ./src/errors/SchemaError.ts
|
|
10526
10943
|
var SchemaError = __webpack_require__(131);
|
|
10527
|
-
;// CONCATENATED MODULE: ./src/codegen/utils.ts
|
|
10528
|
-
/**
|
|
10529
|
-
* Counts non-overlapping occurrences of a term in text.
|
|
10530
|
-
*
|
|
10531
|
-
* Behavior:
|
|
10532
|
-
* - Case-sensitive matching
|
|
10533
|
-
* - If the search term is composed entirely of word characters (A–Z, a–z, 0–9, _),
|
|
10534
|
-
* enforce whole-word boundaries so "red" does not match inside "redder".
|
|
10535
|
-
* - If the search term contains any non-word character (e.g. "=>", "()", "::"),
|
|
10536
|
-
* match anywhere without boundary checks (useful for symbols).
|
|
10537
|
-
* - Non-overlapping matches (after a hit, advances by term length)
|
|
10538
|
-
* - Optimized single-character fast path; otherwise uses indexOf loop
|
|
10539
|
-
*
|
|
10540
|
-
* Examples:
|
|
10541
|
-
* - countWordOccurance("red redder red", "red") => 2
|
|
10542
|
-
* - countWordOccurance("()=>{}", "=>") => 1
|
|
10543
|
-
* - countWordOccurance("aaaa", "aa") => 2 (non-overlapping)
|
|
10544
|
-
*
|
|
10545
|
-
* @param text The source text to scan
|
|
10546
|
-
* @param word The term to match (must be non-empty)
|
|
10547
|
-
* @returns The number of occurrences found
|
|
10548
|
-
*/ const countWordOccurance = (text, word)=>{
|
|
10549
|
-
const wl = word.length;
|
|
10550
|
-
const tl = text.length;
|
|
10551
|
-
if (wl === 0 || wl > tl) return 0;
|
|
10552
|
-
// Fast path for single-character words
|
|
10553
|
-
if (wl === 1) {
|
|
10554
|
-
let c = 0;
|
|
10555
|
-
const code = word.charCodeAt(0);
|
|
10556
|
-
for(let i = 0; i < tl; i++)if (text.charCodeAt(i) === code) c++;
|
|
10557
|
-
return c;
|
|
10558
|
-
}
|
|
10559
|
-
let count = 0;
|
|
10560
|
-
let i = 0;
|
|
10561
|
-
function isWordCharCode(c) {
|
|
10562
|
-
return c >= 48 && c <= 57 // 0-9
|
|
10563
|
-
|| c >= 65 && c <= 90 // A-Z
|
|
10564
|
-
|| c >= 97 && c <= 122 // a-z
|
|
10565
|
-
|| c === 95; // _
|
|
10566
|
-
}
|
|
10567
|
-
// Decide whether to enforce word boundaries based on the search term
|
|
10568
|
-
let enforceWordBoundaries = true;
|
|
10569
|
-
for(let k = 0; k < wl; k++){
|
|
10570
|
-
const cc = word.charCodeAt(k);
|
|
10571
|
-
if (!isWordCharCode(cc)) {
|
|
10572
|
-
enforceWordBoundaries = false;
|
|
10573
|
-
break;
|
|
10574
|
-
}
|
|
10575
|
-
}
|
|
10576
|
-
while(true){
|
|
10577
|
-
i = text.indexOf(word, i);
|
|
10578
|
-
if (i === -1) break;
|
|
10579
|
-
if (enforceWordBoundaries) {
|
|
10580
|
-
const left = i - 1;
|
|
10581
|
-
const right = i + wl;
|
|
10582
|
-
const leftOk = left < 0 || !isWordCharCode(text.charCodeAt(left));
|
|
10583
|
-
const rightOk = right >= tl || !isWordCharCode(text.charCodeAt(right));
|
|
10584
|
-
if (leftOk && rightOk) count++;
|
|
10585
|
-
} else {
|
|
10586
|
-
// No boundary enforcement for symbol-containing terms
|
|
10587
|
-
count++;
|
|
10588
|
-
}
|
|
10589
|
-
i += wl; // non-overlapping word matches
|
|
10590
|
-
}
|
|
10591
|
-
return count;
|
|
10592
|
-
};
|
|
10593
|
-
|
|
10594
10944
|
;// CONCATENATED MODULE: ./src/codegen/handlers/types.ts
|
|
10595
10945
|
|
|
10596
10946
|
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
10947
|
/**
|
|
10600
10948
|
* Terminal link for chains that apply only to a subset of properties (keys,
|
|
10601
10949
|
* identities). Returning the builder marks every other property as
|
|
@@ -10771,34 +11119,16 @@ class PropertyInfoHandler {
|
|
|
10771
11119
|
}
|
|
10772
11120
|
enriched.property(`${property.name}: ${entitySelectorPath}`);
|
|
10773
11121
|
}
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
const index = stringifiedFunction.indexOf("=>");
|
|
10785
|
-
body = stringifiedFunction.slice(index + 2, stringifiedFunction.length);
|
|
10786
|
-
}
|
|
10787
|
-
if (body.startsWith("{") === true && body.endsWith("}")) {
|
|
10788
|
-
// Remove brackets, wrapping function will have them
|
|
10789
|
-
builder.appendBody(body.slice(1, body.length - 1));
|
|
10790
|
-
return {
|
|
10791
|
-
builder,
|
|
10792
|
-
parameters
|
|
10793
|
-
};
|
|
10794
|
-
}
|
|
10795
|
-
builder.appendBody(`return ${body};`);
|
|
10796
|
-
return {
|
|
10797
|
-
builder,
|
|
10798
|
-
parameters
|
|
10799
|
-
};
|
|
10800
|
-
}
|
|
10801
|
-
throw new Error("Only arrow functions are allowed in the schema definition: function () {} ---> () => {}");
|
|
11122
|
+
/**
|
|
11123
|
+
* Binds a function the schema author supplied (a default, a computed, a serializer) into
|
|
11124
|
+
* the generated code and returns the expression that calls it with `args`.
|
|
11125
|
+
*
|
|
11126
|
+
* The function is passed in by value rather than pasted in as source text. Pasted source
|
|
11127
|
+
* loses the scope it was written in, so a default that called an imported helper threw, and
|
|
11128
|
+
* it had to be parsed back apart, which only worked for arrows: a bundler that lowers arrows
|
|
11129
|
+
* to `function` expressions, or renames what they refer to, broke every schema (#46).
|
|
11130
|
+
*/ emitBoundCall(target, fn, args) {
|
|
11131
|
+
return `${target.bind(fn)}(${args.join(", ")})`;
|
|
10802
11132
|
}
|
|
10803
11133
|
}
|
|
10804
11134
|
|
|
@@ -10958,28 +11288,21 @@ class EnrichmentPrimitiveHandler extends PropertyInfoHandler {
|
|
|
10958
11288
|
class EnrichmentFunctionHandler extends PropertyInfoHandler {
|
|
10959
11289
|
handle(property, builder) {
|
|
10960
11290
|
if (property.functionBody != null && property.type === types/* .SchemaTypes.Function */.L.Function) {
|
|
10961
|
-
const
|
|
11291
|
+
const factory = builder.get("factory");
|
|
11292
|
+
const args = [
|
|
10962
11293
|
"enriched",
|
|
10963
11294
|
"collectionName"
|
|
10964
11295
|
];
|
|
10965
11296
|
if (property.injected != null) {
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
factory.parameters(parameter);
|
|
10969
|
-
parameterNames.push(parameter.name);
|
|
10970
|
-
}
|
|
10971
|
-
const declarationsSlot = builder.get("factory.function.declarations");
|
|
10972
|
-
// Unwrap the functions to removing currying
|
|
10973
|
-
const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);
|
|
10974
|
-
defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i)=>({
|
|
10975
|
-
name: defaultFunctionWithParameters.parameters[i],
|
|
10976
|
-
callName: w
|
|
10977
|
-
})));
|
|
11297
|
+
args.push(factory.bind(property.injected));
|
|
11298
|
+
}
|
|
10978
11299
|
const slot = builder.get("factory.function.assignment");
|
|
10979
11300
|
const enrichedAssignmentPath = property.getAssignmentPath({
|
|
10980
11301
|
parent: "enriched"
|
|
10981
11302
|
});
|
|
10982
|
-
|
|
11303
|
+
// The definition is curried: calling it with the entity returns the function the
|
|
11304
|
+
// property holds
|
|
11305
|
+
slot.assign(enrichedAssignmentPath).value(this.emitBoundCall(factory, property.functionBody, args));
|
|
10983
11306
|
return builder;
|
|
10984
11307
|
}
|
|
10985
11308
|
return super.handle(property, builder);
|
|
@@ -11034,34 +11357,17 @@ class EnrichmentDefaultFunctionHandler extends PropertyInfoHandler {
|
|
|
11034
11357
|
handle(property, builder) {
|
|
11035
11358
|
if (property.defaultValue != null && typeof property.defaultValue === "function") {
|
|
11036
11359
|
this.setEnrichedProperty(property, builder);
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
}
|
|
11044
|
-
const parameter = factory.createParameter(property.injected);
|
|
11045
|
-
factory.parameters(parameter);
|
|
11046
|
-
const defaultFunctionWithParameters = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);
|
|
11047
|
-
// This is ok, defaults can only inject one parameter anyways
|
|
11048
|
-
defaultFunctionWithParameters.builder.parameters(...defaultFunctionWithParameters.parameters.map((w)=>({
|
|
11049
|
-
name: w,
|
|
11050
|
-
callName: parameter.name
|
|
11051
|
-
})));
|
|
11052
|
-
const ifsSlot = builder.get("factory.function.ifs");
|
|
11053
|
-
const enrichedAssignmentPath = property.getAssignmentPath({
|
|
11054
|
-
parent: "enriched"
|
|
11055
|
-
});
|
|
11056
|
-
ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${defaultFunctionWithParameters.builder.toCallable()}`);
|
|
11057
|
-
return builder;
|
|
11058
|
-
}
|
|
11059
|
-
const defaultFunction = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);
|
|
11360
|
+
const factory = builder.get("factory");
|
|
11361
|
+
// Defaults take at most one argument: the injected value, when there is one
|
|
11362
|
+
const args = property.injected != null ? [
|
|
11363
|
+
factory.bind(property.injected)
|
|
11364
|
+
] : [];
|
|
11365
|
+
const call = this.emitBoundCall(factory, property.defaultValue, args);
|
|
11060
11366
|
const ifsSlot = builder.get("factory.function.ifs");
|
|
11061
11367
|
const enrichedAssignmentPath = property.getAssignmentPath({
|
|
11062
11368
|
parent: "enriched"
|
|
11063
11369
|
});
|
|
11064
|
-
ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${
|
|
11370
|
+
ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${call}`);
|
|
11065
11371
|
return builder;
|
|
11066
11372
|
}
|
|
11067
11373
|
return super.handle(property, builder);
|
|
@@ -11074,22 +11380,15 @@ class EnrichmentDefaultFunctionHandler extends PropertyInfoHandler {
|
|
|
11074
11380
|
class EnrichmentComputedValueHandler extends PropertyInfoHandler {
|
|
11075
11381
|
handle(property, builder) {
|
|
11076
11382
|
if (property.functionBody != null && property.type === types/* .SchemaTypes.Computed */.L.Computed) {
|
|
11077
|
-
const
|
|
11383
|
+
const factory = builder.get("factory");
|
|
11384
|
+
const args = [
|
|
11078
11385
|
"enriched",
|
|
11079
11386
|
"collectionName"
|
|
11080
11387
|
];
|
|
11081
11388
|
if (property.injected != null) {
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
parameterNames.push(parameter.name);
|
|
11086
|
-
}
|
|
11087
|
-
const declarationsSlot = builder.get("factory.function.declarations");
|
|
11088
|
-
const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);
|
|
11089
|
-
defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i)=>({
|
|
11090
|
-
name: defaultFunctionWithParameters.parameters[i],
|
|
11091
|
-
callName: w
|
|
11092
|
-
})));
|
|
11389
|
+
args.push(factory.bind(property.injected));
|
|
11390
|
+
}
|
|
11391
|
+
const call = this.emitBoundCall(factory, property.functionBody, args);
|
|
11093
11392
|
// Compute-once semantics for computed keys/identities: an existing value is
|
|
11094
11393
|
// carried into the enriched literal and never recomputed — a key must stay
|
|
11095
11394
|
// stable once assigned (content-hash ids would otherwise churn as the
|
|
@@ -11102,44 +11401,15 @@ class EnrichmentComputedValueHandler extends PropertyInfoHandler {
|
|
|
11102
11401
|
const enrichedAssignmentPath = property.getAssignmentPath({
|
|
11103
11402
|
parent: "enriched"
|
|
11104
11403
|
});
|
|
11105
|
-
ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${
|
|
11404
|
+
ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${call}`);
|
|
11106
11405
|
return builder;
|
|
11107
11406
|
}
|
|
11108
11407
|
return super.handle(property, builder);
|
|
11109
11408
|
}
|
|
11110
11409
|
}
|
|
11111
11410
|
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
/**
|
|
11115
|
-
* Types whose runtime value is a JS array.
|
|
11116
|
-
*
|
|
11117
|
-
* `Array` and `Vector` are the same thing to every layer that copies, compares, hashes or
|
|
11118
|
-
* freezes a value — a vector is a list of numbers and nothing more. They differ only where a
|
|
11119
|
-
* backend chooses storage, which is the one place that should ask for `SchemaTypes.Vector` by
|
|
11120
|
-
* name.
|
|
11121
|
-
*
|
|
11122
|
-
* This exists so adding a third array-shaped type is one edit rather than a hunt through
|
|
11123
|
-
* twelve handlers. Missing one of those is silent in the worst way: a vector that clones by
|
|
11124
|
-
* reference is shared with the change tracker's copy, so overwriting an embedding produces no
|
|
11125
|
-
* diff and the save reports nothing to do.
|
|
11126
|
-
*/ const ARRAY_VALUED_TYPES = new Set([
|
|
11127
|
-
types/* .SchemaTypes.Array */.L.Array,
|
|
11128
|
-
types/* .SchemaTypes.Vector */.L.Vector
|
|
11129
|
-
]);
|
|
11130
|
-
/** True when the property's value is a JS array and needs value rather than reference semantics. */ const isArrayValued = (type)=>ARRAY_VALUED_TYPES.has(type);
|
|
11131
|
-
/**
|
|
11132
|
-
* True when the property's elements are primitives, so a spread is a sufficient copy.
|
|
11133
|
-
*
|
|
11134
|
-
* A vector is always numbers, so it never needs the per-element deep copy an array of objects
|
|
11135
|
-
* or dates does.
|
|
11136
|
-
*/ const PRIMITIVE_ELEMENT_TYPES = new Set([
|
|
11137
|
-
types/* .SchemaTypes.String */.L.String,
|
|
11138
|
-
types/* .SchemaTypes.Number */.L.Number,
|
|
11139
|
-
types/* .SchemaTypes.Boolean */.L.Boolean
|
|
11140
|
-
]);
|
|
11141
|
-
const hasPrimitiveElements = (type, elementType)=>type === types/* .SchemaTypes.Vector */.L.Vector || PRIMITIVE_ELEMENT_TYPES.has(elementType);
|
|
11142
|
-
|
|
11411
|
+
// EXTERNAL MODULE: ./src/schema/utils/propertyKind.ts
|
|
11412
|
+
var propertyKind = __webpack_require__(575);
|
|
11143
11413
|
;// CONCATENATED MODULE: ./src/codegen/handlers/enrichment/EnrichmentArrayHandler.ts
|
|
11144
11414
|
|
|
11145
11415
|
|
|
@@ -11149,7 +11419,7 @@ const hasPrimitiveElements = (type, elementType)=>type === types/* .SchemaTypes.
|
|
|
11149
11419
|
* mark the root entity dirty instead of being silently lost on save.
|
|
11150
11420
|
*/ class EnrichmentArrayHandler extends PropertyInfoHandler {
|
|
11151
11421
|
handle(property, builder) {
|
|
11152
|
-
if (isArrayValued(property.type)) {
|
|
11422
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
11153
11423
|
// Place the property in the enriched literal like any other leaf
|
|
11154
11424
|
this.setEnrichedProperty(property, builder);
|
|
11155
11425
|
const enrichedPath = property.getAssignmentPath({
|
|
@@ -11191,13 +11461,10 @@ class MergeDefaultFunctionHandler extends PropertyInfoHandler {
|
|
|
11191
11461
|
// we are changing merge to be more like enrich so we can handle injections
|
|
11192
11462
|
// we may need to change more. Need to move towards factories
|
|
11193
11463
|
if (property.defaultValue != null && typeof property.defaultValue === "function") {
|
|
11194
|
-
const
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
factory.parameters(parameter);
|
|
11199
|
-
defaultFunctionParameters.push(parameter.name);
|
|
11200
|
-
}
|
|
11464
|
+
const factory = builder.get("factory");
|
|
11465
|
+
const args = property.injected != null ? [
|
|
11466
|
+
factory.bind(property.injected)
|
|
11467
|
+
] : [];
|
|
11201
11468
|
// A defaulted property still merges from the source; the default only fills
|
|
11202
11469
|
// the gap when neither side has a value
|
|
11203
11470
|
this.emitMergeCopy(property, builder, {
|
|
@@ -11213,15 +11480,9 @@ class MergeDefaultFunctionHandler extends PropertyInfoHandler {
|
|
|
11213
11480
|
const assignmentPath = property.getAssignmentPath({
|
|
11214
11481
|
parent: "destination"
|
|
11215
11482
|
});
|
|
11216
|
-
const declarationsSlot = builder.get("factory.function.header");
|
|
11217
|
-
const defaultFunctionWithParameters = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);
|
|
11218
|
-
defaultFunctionWithParameters.builder.parameters(...defaultFunctionParameters.map((w, i)=>({
|
|
11219
|
-
name: defaultFunctionWithParameters.parameters[i],
|
|
11220
|
-
callName: w
|
|
11221
|
-
})));
|
|
11222
11483
|
const defaultIf = ifsSlot.if(`${selectorPath} == null`);
|
|
11223
11484
|
this.emitDestinationAncestorGuards(property, defaultIf);
|
|
11224
|
-
defaultIf.appendBody(`${assignmentPath} = ${
|
|
11485
|
+
defaultIf.appendBody(`${assignmentPath} = ${this.emitBoundCall(factory, property.defaultValue, args)}`);
|
|
11225
11486
|
return builder;
|
|
11226
11487
|
}
|
|
11227
11488
|
return super.handle(property, builder);
|
|
@@ -11262,28 +11523,20 @@ class MergePrimitiveHandler extends PropertyInfoHandler {
|
|
|
11262
11523
|
class MergeComputedValueHandler extends PropertyInfoHandler {
|
|
11263
11524
|
handle(property, builder) {
|
|
11264
11525
|
if (property.functionBody != null && property.type === types/* .SchemaTypes.Computed */.L.Computed) {
|
|
11265
|
-
const
|
|
11526
|
+
const factory = builder.get("factory");
|
|
11527
|
+
const args = [
|
|
11266
11528
|
"source",
|
|
11267
11529
|
"collectionName"
|
|
11268
11530
|
];
|
|
11269
11531
|
if (property.injected != null) {
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
factory.parameters(parameter);
|
|
11273
|
-
parameterNames.push(parameter.name);
|
|
11274
|
-
}
|
|
11275
|
-
const declarationsSlot = builder.get("factory.function.header");
|
|
11276
|
-
const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);
|
|
11277
|
-
defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i)=>({
|
|
11278
|
-
name: defaultFunctionWithParameters.parameters[i],
|
|
11279
|
-
callName: w
|
|
11280
|
-
})));
|
|
11532
|
+
args.push(factory.bind(property.injected));
|
|
11533
|
+
}
|
|
11281
11534
|
const slot = builder.get("factory.function.assignments");
|
|
11282
11535
|
const enrichedAssignmentPath = property.getAssignmentPath({
|
|
11283
11536
|
parent: "destination"
|
|
11284
11537
|
});
|
|
11285
11538
|
// We want to recompute the value always in case there are changes
|
|
11286
|
-
slot.assign(enrichedAssignmentPath).value(
|
|
11539
|
+
slot.assign(enrichedAssignmentPath).value(this.emitBoundCall(factory, property.functionBody, args));
|
|
11287
11540
|
return builder;
|
|
11288
11541
|
}
|
|
11289
11542
|
return super.handle(property, builder);
|
|
@@ -11356,7 +11609,7 @@ class MergeFunctionHandler extends PropertyInfoHandler {
|
|
|
11356
11609
|
* reference is adopted as-is — same as the primitive copy this replaces.
|
|
11357
11610
|
*/ class MergeArrayHandler extends PropertyInfoHandler {
|
|
11358
11611
|
handle(property, builder) {
|
|
11359
|
-
if (isArrayValued(property.type)) {
|
|
11612
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
11360
11613
|
const selectorPath = property.getSelectrorPath({
|
|
11361
11614
|
parent: "source",
|
|
11362
11615
|
assignmentType: "FORCE_NULLABLE_OR_OPTIONAL"
|
|
@@ -11693,7 +11946,7 @@ class CloneArrayHandler extends PropertyInfoHandler {
|
|
|
11693
11946
|
super(), this.useFromPropertyName = useFromPropertyName;
|
|
11694
11947
|
}
|
|
11695
11948
|
handle(property, builder) {
|
|
11696
|
-
if (isArrayValued(property.type)) {
|
|
11949
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
11697
11950
|
// Arrays are leaf properties — they have no child PropertyInfos, so the
|
|
11698
11951
|
// copy must happen here for every array, including nullable/optional ones.
|
|
11699
11952
|
// The `!== undefined` guard below covers absent values; an explicit null is copied as
|
|
@@ -11719,7 +11972,7 @@ class CloneArrayHandler extends PropertyInfoHandler {
|
|
|
11719
11972
|
// across merges), and a Proxy cannot pass a structured-clone boundary.
|
|
11720
11973
|
const elementType = property.innerSchema?.type;
|
|
11721
11974
|
let copyExpression;
|
|
11722
|
-
if (hasPrimitiveElements(property.type, elementType)) {
|
|
11975
|
+
if ((0,propertyKind/* .hasPrimitiveElements */.L)(property.type, elementType)) {
|
|
11723
11976
|
copyExpression = `[...${entitySelectorPath}]`;
|
|
11724
11977
|
} else if (elementType === types/* .SchemaTypes.Date */.L.Date) {
|
|
11725
11978
|
copyExpression = `${entitySelectorPath}.map(function (v) { return v == null ? v : new Date(v); })`;
|
|
@@ -11838,7 +12091,7 @@ class CloneObjectHandler extends PropertyInfoHandler {
|
|
|
11838
12091
|
// Anything that copies by assignment. An array-valued property must not land here:
|
|
11839
12092
|
// assigning the reference shares it with the source, which is the whole point of
|
|
11840
12093
|
// CloneArrayHandler.
|
|
11841
|
-
if (property.type != types/* .SchemaTypes.Object */.L.Object && isArrayValued(property.type) === false) {
|
|
12094
|
+
if (property.type != types/* .SchemaTypes.Object */.L.Object && (0,propertyKind/* .isArrayValued */.l)(property.type) === false) {
|
|
11842
12095
|
const slot = builder.get("if");
|
|
11843
12096
|
const useFromPropertyName = this.useFromPropertyName;
|
|
11844
12097
|
const entitySelectorPath = property.getSelectrorPath({
|
|
@@ -11901,7 +12154,7 @@ class CloneHandlerBuilder {
|
|
|
11901
12154
|
|
|
11902
12155
|
class CompareArrayHandler extends PropertyInfoHandler {
|
|
11903
12156
|
handle(property, builder) {
|
|
11904
|
-
if (isArrayValued(property.type)) {
|
|
12157
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
11905
12158
|
let compare = builder.getOrDefault("result.variable.compare");
|
|
11906
12159
|
const leftCompare = property.getSelectrorPath({
|
|
11907
12160
|
parent: "a"
|
|
@@ -12196,7 +12449,6 @@ class DeserializeDeserializerHandler extends PropertyInfoHandler {
|
|
|
12196
12449
|
handle(property, builder) {
|
|
12197
12450
|
if (property.valueDeserializer != null) {
|
|
12198
12451
|
let objectBuilder = builder.getOrDefault("result.variable.object");
|
|
12199
|
-
const assignmentBuilder = builder.getOrDefault("functions");
|
|
12200
12452
|
// Read the incoming record by `from` (storage) name
|
|
12201
12453
|
const entitySelectorPath = property.getSelectrorPath({
|
|
12202
12454
|
parent: "unserialized",
|
|
@@ -12209,18 +12461,16 @@ class DeserializeDeserializerHandler extends PropertyInfoHandler {
|
|
|
12209
12461
|
name: "object"
|
|
12210
12462
|
});
|
|
12211
12463
|
}
|
|
12212
|
-
const
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
callName: entitySelectorPath
|
|
12216
|
-
})));
|
|
12464
|
+
const call = this.emitBoundCall(builder, property.valueDeserializer, [
|
|
12465
|
+
entitySelectorPath
|
|
12466
|
+
]);
|
|
12217
12467
|
if (property.parent == null) {
|
|
12218
|
-
objectBuilder.property(`${property.name}: ${
|
|
12468
|
+
objectBuilder.property(`${property.name}: ${call}`);
|
|
12219
12469
|
return builder;
|
|
12220
12470
|
}
|
|
12221
12471
|
const slotPath = new SlotPath(...property.getParentPathArray());
|
|
12222
12472
|
objectBuilder = objectBuilder.get(slotPath.get());
|
|
12223
|
-
objectBuilder.property(`${property.name}: ${
|
|
12473
|
+
objectBuilder.property(`${property.name}: ${call}`);
|
|
12224
12474
|
return builder;
|
|
12225
12475
|
}
|
|
12226
12476
|
return super.handle(property, builder);
|
|
@@ -12246,7 +12496,7 @@ class DeserializeDeserializerHandler extends PropertyInfoHandler {
|
|
|
12246
12496
|
return `[...${selector}]`;
|
|
12247
12497
|
}
|
|
12248
12498
|
handle(property, builder) {
|
|
12249
|
-
if (isArrayValued(property.type)) {
|
|
12499
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
12250
12500
|
const slotPath = new SlotPath("result.variable.object");
|
|
12251
12501
|
// Create the result object when this is the first property iterated —
|
|
12252
12502
|
// handler output cannot depend on schema property order
|
|
@@ -12487,7 +12737,7 @@ class HashComputedValueHandler extends PropertyInfoHandler {
|
|
|
12487
12737
|
* objects would collapse every value to "[object Object]" and collide.
|
|
12488
12738
|
*/ class HashArrayHandler extends PropertyInfoHandler {
|
|
12489
12739
|
handle(property, builder) {
|
|
12490
|
-
if (isArrayValued(property.type)) {
|
|
12740
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
12491
12741
|
let stringBuilder = builder.getOrDefault("hash-object-return.variable.string");
|
|
12492
12742
|
const entitySelectorPath = property.getSelectrorPath({
|
|
12493
12743
|
parent: "entity"
|
|
@@ -12652,7 +12902,7 @@ class EnableChangeTrackingObjectHandler extends PropertyInfoHandler {
|
|
|
12652
12902
|
* mark the root entity dirty instead of being silently lost on save.
|
|
12653
12903
|
*/ class EnableChangeTrackingArrayHandler extends PropertyInfoHandler {
|
|
12654
12904
|
handle(property, builder) {
|
|
12655
|
-
if (isArrayValued(property.type)) {
|
|
12905
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
12656
12906
|
const assignmentSlot = builder.get("assignment");
|
|
12657
12907
|
const childSelectorPath = property.getSelectrorPath({
|
|
12658
12908
|
parent: "entity"
|
|
@@ -12729,7 +12979,7 @@ class FreezeObjectHandler extends PropertyInfoHandler {
|
|
|
12729
12979
|
|
|
12730
12980
|
class FreezeArrayHandler extends PropertyInfoHandler {
|
|
12731
12981
|
handle(property, builder) {
|
|
12732
|
-
if (isArrayValued(property.type)) {
|
|
12982
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
12733
12983
|
const assignmentSlot = builder.get("assignment");
|
|
12734
12984
|
const childSelectorPath = property.getSelectrorPath({
|
|
12735
12985
|
parent: "entity"
|
|
@@ -12865,7 +13115,6 @@ class SerializeSerializerHandler extends PropertyInfoHandler {
|
|
|
12865
13115
|
handle(property, builder) {
|
|
12866
13116
|
if (property.valueSerializer != null) {
|
|
12867
13117
|
const slot = builder.getOrDefault("if");
|
|
12868
|
-
const assignmentBuilder = builder.getOrDefault("functions");
|
|
12869
13118
|
// Serialize maps in-memory shape -> storage shape: read the entity by
|
|
12870
13119
|
// property name, write the result by `from` (storage) name
|
|
12871
13120
|
const entitySelectorPath = property.getSelectrorPath({
|
|
@@ -12875,17 +13124,15 @@ class SerializeSerializerHandler extends PropertyInfoHandler {
|
|
|
12875
13124
|
parent: "result",
|
|
12876
13125
|
useFromPropertyName: true
|
|
12877
13126
|
});
|
|
12878
|
-
const
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
callName: entitySelectorPath
|
|
12882
|
-
})));
|
|
13127
|
+
const call = this.emitBoundCall(builder, property.valueSerializer, [
|
|
13128
|
+
entitySelectorPath
|
|
13129
|
+
]);
|
|
12883
13130
|
if (property.parent == null) {
|
|
12884
|
-
slot.if(`Object.hasOwn(entity, "${property.name}")`).appendBody(`${resultSelectorPath} = ${
|
|
13131
|
+
slot.if(`Object.hasOwn(entity, "${property.name}")`).appendBody(`${resultSelectorPath} = ${call}`);
|
|
12885
13132
|
return builder;
|
|
12886
13133
|
}
|
|
12887
13134
|
// Nested serializer: same pattern as SerializeValueHandler — if block for parent existence, then assign via serializer
|
|
12888
|
-
this.emitSerializeNestedAssignment(property, slot,
|
|
13135
|
+
this.emitSerializeNestedAssignment(property, slot, call);
|
|
12889
13136
|
return builder;
|
|
12890
13137
|
}
|
|
12891
13138
|
return super.handle(property, builder);
|
|
@@ -12944,7 +13191,7 @@ class SerializeComputedHandler extends PropertyInfoHandler {
|
|
|
12944
13191
|
return `[...${selector}]`;
|
|
12945
13192
|
}
|
|
12946
13193
|
handle(property, builder) {
|
|
12947
|
-
if (isArrayValued(property.type)) {
|
|
13194
|
+
if ((0,propertyKind/* .isArrayValued */.l)(property.type)) {
|
|
12948
13195
|
const slot = builder.get("if");
|
|
12949
13196
|
// Serialize maps in-memory shape -> storage shape: read the entity by
|
|
12950
13197
|
// property name, write the result by `from` (storage) name
|
|
@@ -13848,8 +14095,8 @@ const arrayConverter = (property, context)=>{
|
|
|
13848
14095
|
// Create the function using new Function()
|
|
13849
14096
|
// If no parameters, call with just the body; otherwise spread the params
|
|
13850
14097
|
const fn = params.length > 0 ? new Function(...params, functionBody) : new Function(functionBody);
|
|
13851
|
-
// Wrap it so toString() returns the original arrow function string
|
|
13852
|
-
//
|
|
14098
|
+
// Wrap it so toString() returns the original arrow function string, so
|
|
14099
|
+
// serializing the rehydrated schema writes the same functionSource again
|
|
13853
14100
|
recreatedFn = Object.assign(fn, {
|
|
13854
14101
|
toString: ()=>functionSource
|
|
13855
14102
|
});
|
|
@@ -13858,7 +14105,7 @@ const arrayConverter = (property, context)=>{
|
|
|
13858
14105
|
recreatedFn = ()=>{
|
|
13859
14106
|
throw new Error(`Cannot recreate computed property ${computedProp.name}: ${e instanceof Error ? e.message : 'unknown error'}`);
|
|
13860
14107
|
};
|
|
13861
|
-
//
|
|
14108
|
+
// Keep functionSource re-parseable if this schema is serialized again
|
|
13862
14109
|
Object.assign(recreatedFn, {
|
|
13863
14110
|
toString: ()=>`() => { throw new Error("Cannot recreate computed property ${computedProp.name}"); }`
|
|
13864
14111
|
});
|
|
@@ -13995,39 +14242,16 @@ class SetHandlerBuilder {
|
|
|
13995
14242
|
}
|
|
13996
14243
|
}
|
|
13997
14244
|
|
|
13998
|
-
;// CONCATENATED MODULE: ./src/schema/
|
|
13999
|
-
|
|
14000
|
-
|
|
14001
|
-
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14011
|
-
|
|
14012
|
-
|
|
14013
|
-
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
function assertPropertyHandled(generatorName, property, result) {
|
|
14026
|
-
if (result == null) {
|
|
14027
|
-
throw new Error(`Schema compilation failed: no '${generatorName}' code generator handles property '${property.getAssignmentPath()}' (type: ${property.type}). Add a handler for this property shape or mark it not applicable in the ${generatorName} chain.`);
|
|
14028
|
-
}
|
|
14029
|
-
}
|
|
14030
|
-
function createChangeTracker() {
|
|
14245
|
+
;// CONCATENATED MODULE: ./src/schema/changeTracker.ts
|
|
14246
|
+
/**
|
|
14247
|
+
* Builds the proxy factory that change-tracks an entity.
|
|
14248
|
+
*
|
|
14249
|
+
* Generated schema code receives the result as a bound value — a parameter of the generated
|
|
14250
|
+
* factory — and never refers to this module by name. Name references do not survive a minifier,
|
|
14251
|
+
* which renames the declaration but cannot see inside generated source text (#40, #46). The
|
|
14252
|
+
* returned function holds no per-entity state, so one per compiled schema is shared by every
|
|
14253
|
+
* entity it tracks.
|
|
14254
|
+
*/ function createChangeTracker() {
|
|
14031
14255
|
const DIRTY_ENTITY_MARKER = "isDirty";
|
|
14032
14256
|
const CHANGES_ENTITY_KEY = "changes";
|
|
14033
14257
|
const ORIGINAL_ENTITY_KEY = "original";
|
|
@@ -14126,6 +14350,40 @@ function createChangeTracker() {
|
|
|
14126
14350
|
return new Proxy(entity, proxyHandler);
|
|
14127
14351
|
};
|
|
14128
14352
|
}
|
|
14353
|
+
|
|
14354
|
+
;// CONCATENATED MODULE: ./src/schema/SchemaDefinition.ts
|
|
14355
|
+
|
|
14356
|
+
|
|
14357
|
+
|
|
14358
|
+
|
|
14359
|
+
|
|
14360
|
+
|
|
14361
|
+
|
|
14362
|
+
|
|
14363
|
+
|
|
14364
|
+
|
|
14365
|
+
|
|
14366
|
+
|
|
14367
|
+
|
|
14368
|
+
|
|
14369
|
+
|
|
14370
|
+
|
|
14371
|
+
|
|
14372
|
+
|
|
14373
|
+
|
|
14374
|
+
|
|
14375
|
+
|
|
14376
|
+
|
|
14377
|
+
|
|
14378
|
+
|
|
14379
|
+
|
|
14380
|
+
|
|
14381
|
+
|
|
14382
|
+
function assertPropertyHandled(generatorName, property, result) {
|
|
14383
|
+
if (result == null) {
|
|
14384
|
+
throw new Error(`Schema compilation failed: no '${generatorName}' code generator handles property '${property.getAssignmentPath()}' (type: ${property.type}). Add a handler for this property shape or mark it not applicable in the ${generatorName} chain.`);
|
|
14385
|
+
}
|
|
14386
|
+
}
|
|
14129
14387
|
class SchemaDefinition extends SchemaBase {
|
|
14130
14388
|
instance;
|
|
14131
14389
|
type = types/* .SchemaTypes.Definition */.L.Definition;
|
|
@@ -14176,10 +14434,22 @@ class SchemaDefinition extends SchemaBase {
|
|
|
14176
14434
|
throw e;
|
|
14177
14435
|
}
|
|
14178
14436
|
}
|
|
14179
|
-
|
|
14437
|
+
/**
|
|
14438
|
+
* Compiles `builder` into a function taking `fnArgs`.
|
|
14439
|
+
*
|
|
14440
|
+
* A builder with bindings is compiled one level out: an outer function whose parameters are
|
|
14441
|
+
* the bindings, called once here with their values, returns the function that is kept. The
|
|
14442
|
+
* bound values become closure variables of that function, so the per-call cost is a context
|
|
14443
|
+
* read rather than anything resolved by name.
|
|
14444
|
+
*/ createFunction(builder, ...fnArgs) {
|
|
14180
14445
|
const body = builder.toString();
|
|
14446
|
+
const bindings = builder.getBindings();
|
|
14181
14447
|
try {
|
|
14182
|
-
|
|
14448
|
+
if (bindings.length === 0) {
|
|
14449
|
+
return Function(...fnArgs, body);
|
|
14450
|
+
}
|
|
14451
|
+
const outer = Function(...bindings.map((w)=>w.name), `return function(${fnArgs.join(", ")}) {\n${body}\n}`);
|
|
14452
|
+
return outer(...bindings.map((w)=>w.value));
|
|
14183
14453
|
} catch (e) {
|
|
14184
14454
|
logger/* .logger.error */.vF.error(`Error compiling schema function. Function Body: ${body}`);
|
|
14185
14455
|
throw e;
|
|
@@ -14312,9 +14582,11 @@ class SchemaDefinition extends SchemaBase {
|
|
|
14312
14582
|
const serializeHandler = serializeHandlerBuilder.build();
|
|
14313
14583
|
const compareIdsHandler = compareIdsHandlerBuilder.build();
|
|
14314
14584
|
const setHandlerHanlder = setHandlerBuilder.build();
|
|
14585
|
+
// Handed to the generated functions as a value, never embedded as source and called
|
|
14586
|
+
// by name — a minifier renames the declaration and breaks every schema (#40).
|
|
14587
|
+
const changeTracker = createChangeTracker();
|
|
14315
14588
|
const changeTrackingCodeBuilder = new blocks/* .CodeBuilder */.Nl();
|
|
14316
|
-
changeTrackingCodeBuilder.
|
|
14317
|
-
changeTrackingCodeBuilder.slot("declarations").variable("enableChangeTracking").value('createChangeTracker()');
|
|
14589
|
+
changeTrackingCodeBuilder.bind(changeTracker, "enableChangeTracking");
|
|
14318
14590
|
// Nested proxies are installed by assigning through already-proxied parents;
|
|
14319
14591
|
// pause tracking during setup so those writes don't register as changes
|
|
14320
14592
|
changeTrackingCodeBuilder.slot("pause").raw('\tconst hadTracking = entity.__tracking__ != null;\n\tif (!hadTracking) { Object.defineProperty(entity, "__tracking__", { value: { changes: {}, isDirty: false, original: {}, isPaused: false }, configurable: true, writable: true, enumerable: false }); }\n\tconst wasPaused = entity.__tracking__.isPaused;\n\tentity.__tracking__.isPaused = true;');
|
|
@@ -14343,9 +14615,10 @@ class SchemaDefinition extends SchemaBase {
|
|
|
14343
14615
|
}).parameters({
|
|
14344
14616
|
name: "collectionName",
|
|
14345
14617
|
value: this.collectionName
|
|
14618
|
+
}, {
|
|
14619
|
+
name: "changeTracker",
|
|
14620
|
+
value: changeTracker
|
|
14346
14621
|
});
|
|
14347
|
-
enricherFunctionRoot.slot("changeTracker").raw(`${createChangeTracker.toString()}`);
|
|
14348
|
-
enricherFunctionRoot.slot("changeTrackerFunction").raw(`\tconst changeTracker = createChangeTracker();`);
|
|
14349
14622
|
const enricherFunctionBody = enricherFunctionRoot.function(undefined, {
|
|
14350
14623
|
name: "function"
|
|
14351
14624
|
}).parameters("entity", "changeTrackingType").return();
|
|
@@ -14580,6 +14853,8 @@ class SchemaDefinition extends SchemaBase {
|
|
|
14580
14853
|
enricherFunctionBody.get("append").insert(deserializeCodeBuilder.get("result"));
|
|
14581
14854
|
enricherFunctionBody.get("append").insert(deserializeCodeBuilder.get("if"));
|
|
14582
14855
|
enricherFunctionRoot.replace("function", new blocks/* .FunctionBuilder */.kF(undefined).parameters("unserialized", "changeTrackingType").return());
|
|
14856
|
+
// The deserialize slots moved in above call the deserializers bound on their own builder
|
|
14857
|
+
enricherFunctionRoot.parameters(...deserializeCodeBuilder.getBindings());
|
|
14583
14858
|
const postProcessGenerator = this.createReturnFunction(enricherCodeBuilder);
|
|
14584
14859
|
const postProcessParams = enricherFunctionRoot.getParameters();
|
|
14585
14860
|
// Combine prepare and serialize
|
|
@@ -14588,6 +14863,10 @@ class SchemaDefinition extends SchemaBase {
|
|
|
14588
14863
|
preprocessCodeBuilder.get("main").insert(serializeCodeBuilder.get("assignments"));
|
|
14589
14864
|
preprocessCodeBuilder.get("main").insert(serializeCodeBuilder.get("functions"));
|
|
14590
14865
|
preprocessCodeBuilder.get("main").insert(serializeCodeBuilder.get("if"));
|
|
14866
|
+
// Likewise the serialize slots call the serializers bound on the serialize builder
|
|
14867
|
+
for (const binding of serializeCodeBuilder.getBindings()){
|
|
14868
|
+
preprocessCodeBuilder.bind(binding.value, binding.name);
|
|
14869
|
+
}
|
|
14591
14870
|
const getIdsFunction = this.createFunction(idSelectorCodeBuilder, "entity");
|
|
14592
14871
|
const getHashTypeFunction = this.createFunction(hashTypeCodeBuilder, "entity");
|
|
14593
14872
|
const prepareFunction = this.createFunction(prepareCodeBuilder, "entity");
|
|
@@ -15229,6 +15508,8 @@ const s = {
|
|
|
15229
15508
|
|
|
15230
15509
|
|
|
15231
15510
|
|
|
15511
|
+
// EXTERNAL MODULE: ./src/schema/utils/storageDates.ts
|
|
15512
|
+
var storageDates = __webpack_require__(894);
|
|
15232
15513
|
;// CONCATENATED MODULE: ./src/schema/index.ts
|
|
15233
15514
|
|
|
15234
15515
|
|
|
@@ -15242,6 +15523,7 @@ const s = {
|
|
|
15242
15523
|
|
|
15243
15524
|
|
|
15244
15525
|
|
|
15526
|
+
|
|
15245
15527
|
},
|
|
15246
15528
|
537(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
15247
15529
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -15278,6 +15560,129 @@ var HashType = /*#__PURE__*/ function(HashType) {
|
|
|
15278
15560
|
}({});
|
|
15279
15561
|
|
|
15280
15562
|
|
|
15563
|
+
},
|
|
15564
|
+
575(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
15565
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
15566
|
+
L: () => (hasPrimitiveElements),
|
|
15567
|
+
l: () => (isArrayValued)
|
|
15568
|
+
});
|
|
15569
|
+
/* import */ var _types__rspack_import_0 = __webpack_require__(537);
|
|
15570
|
+
|
|
15571
|
+
/**
|
|
15572
|
+
* Types whose runtime value is a JS array.
|
|
15573
|
+
*
|
|
15574
|
+
* `Array` and `Vector` are the same thing to every layer that copies, compares, hashes or
|
|
15575
|
+
* freezes a value — a vector is a list of numbers and nothing more. They differ only where a
|
|
15576
|
+
* backend chooses storage, which is the one place that should ask for `SchemaTypes.Vector` by
|
|
15577
|
+
* name.
|
|
15578
|
+
*
|
|
15579
|
+
* This exists so adding a third array-shaped type is one edit rather than a hunt through
|
|
15580
|
+
* twelve handlers. Missing one of those is silent in the worst way: a vector that clones by
|
|
15581
|
+
* reference is shared with the change tracker's copy, so overwriting an embedding produces no
|
|
15582
|
+
* diff and the save reports nothing to do.
|
|
15583
|
+
*/ const ARRAY_VALUED_TYPES = new Set([
|
|
15584
|
+
_types__rspack_import_0/* .SchemaTypes.Array */.L.Array,
|
|
15585
|
+
_types__rspack_import_0/* .SchemaTypes.Vector */.L.Vector
|
|
15586
|
+
]);
|
|
15587
|
+
/** True when the property's value is a JS array and needs value rather than reference semantics. */ const isArrayValued = (type)=>ARRAY_VALUED_TYPES.has(type);
|
|
15588
|
+
/**
|
|
15589
|
+
* True when the property's elements are primitives, so a spread is a sufficient copy.
|
|
15590
|
+
*
|
|
15591
|
+
* A vector is always numbers, so it never needs the per-element deep copy an array of objects
|
|
15592
|
+
* or dates does.
|
|
15593
|
+
*/ const PRIMITIVE_ELEMENT_TYPES = new Set([
|
|
15594
|
+
_types__rspack_import_0/* .SchemaTypes.String */.L.String,
|
|
15595
|
+
_types__rspack_import_0/* .SchemaTypes.Number */.L.Number,
|
|
15596
|
+
_types__rspack_import_0/* .SchemaTypes.Boolean */.L.Boolean
|
|
15597
|
+
]);
|
|
15598
|
+
const hasPrimitiveElements = (type, elementType)=>type === _types__rspack_import_0/* .SchemaTypes.Vector */.L.Vector || PRIMITIVE_ELEMENT_TYPES.has(elementType);
|
|
15599
|
+
|
|
15600
|
+
|
|
15601
|
+
},
|
|
15602
|
+
894(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
15603
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
15604
|
+
T: () => (getStorageDateReviver)
|
|
15605
|
+
});
|
|
15606
|
+
/* import */ var _types__rspack_import_0 = __webpack_require__(537);
|
|
15607
|
+
/* import */ var _propertyKind__rspack_import_1 = __webpack_require__(575);
|
|
15608
|
+
|
|
15609
|
+
|
|
15610
|
+
const collectDatePaths = (properties, paths)=>{
|
|
15611
|
+
for (const property of properties){
|
|
15612
|
+
// The stored value belongs to whoever wrote it: a custom serializer, deserializer or
|
|
15613
|
+
// transform reads it back, and would be handed a Date it did not expect. Unmapped
|
|
15614
|
+
// properties are never stored.
|
|
15615
|
+
if (property.valueSerializer != null || property.valueDeserializer != null || property.transform != null || property.isUnmapped) {
|
|
15616
|
+
continue;
|
|
15617
|
+
}
|
|
15618
|
+
if (property.type === _types__rspack_import_0/* .SchemaTypes.Object */.L.Object) {
|
|
15619
|
+
collectDatePaths(property.children, paths);
|
|
15620
|
+
continue;
|
|
15621
|
+
}
|
|
15622
|
+
const isArray = (0,_propertyKind__rspack_import_1/* .isArrayValued */.l)(property.type) && property.innerSchema?.type === _types__rspack_import_0/* .SchemaTypes.Date */.L.Date;
|
|
15623
|
+
if (property.type !== _types__rspack_import_0/* .SchemaTypes.Date */.L.Date && isArray === false) {
|
|
15624
|
+
continue;
|
|
15625
|
+
}
|
|
15626
|
+
paths.push({
|
|
15627
|
+
segments: [
|
|
15628
|
+
...property.getParentPathArray({
|
|
15629
|
+
useFromPropertyName: true
|
|
15630
|
+
}),
|
|
15631
|
+
property.getResolvedName()
|
|
15632
|
+
],
|
|
15633
|
+
isArray
|
|
15634
|
+
});
|
|
15635
|
+
}
|
|
15636
|
+
};
|
|
15637
|
+
const reviveAt = (record, path)=>{
|
|
15638
|
+
const { segments } = path;
|
|
15639
|
+
let parent = record;
|
|
15640
|
+
for(let i = 0, length = segments.length - 1; i < length; i++){
|
|
15641
|
+
parent = parent[segments[i]];
|
|
15642
|
+
// An absent or null parent holds no date
|
|
15643
|
+
if (parent == null || typeof parent !== "object") {
|
|
15644
|
+
return;
|
|
15645
|
+
}
|
|
15646
|
+
}
|
|
15647
|
+
const key = segments[segments.length - 1];
|
|
15648
|
+
const value = parent[key];
|
|
15649
|
+
if (path.isArray === false) {
|
|
15650
|
+
if (typeof value === "string") {
|
|
15651
|
+
parent[key] = new Date(value);
|
|
15652
|
+
}
|
|
15653
|
+
return;
|
|
15654
|
+
}
|
|
15655
|
+
if (Array.isArray(value)) {
|
|
15656
|
+
for(let i = 0, length = value.length; i < length; i++){
|
|
15657
|
+
if (typeof value[i] === "string") {
|
|
15658
|
+
value[i] = new Date(value[i]);
|
|
15659
|
+
}
|
|
15660
|
+
}
|
|
15661
|
+
}
|
|
15662
|
+
};
|
|
15663
|
+
/** Per schema: `null` for a schema with no dates, so a caller can skip the pass. */ const revivers = new WeakMap();
|
|
15664
|
+
/**
|
|
15665
|
+
* The reviver for `schema`'s records, or `null` when it declares no dates.
|
|
15666
|
+
*
|
|
15667
|
+
* Built once per compiled schema. A read revives every row it returns, so the paths are resolved
|
|
15668
|
+
* here rather than per row.
|
|
15669
|
+
*/ const getStorageDateReviver = (schema)=>{
|
|
15670
|
+
const cached = revivers.get(schema);
|
|
15671
|
+
if (cached !== undefined) {
|
|
15672
|
+
return cached;
|
|
15673
|
+
}
|
|
15674
|
+
const paths = [];
|
|
15675
|
+
collectDatePaths(schema.properties, paths);
|
|
15676
|
+
const reviver = paths.length === 0 ? null : (record)=>{
|
|
15677
|
+
for(let i = 0, length = paths.length; i < length; i++){
|
|
15678
|
+
reviveAt(record, paths[i]);
|
|
15679
|
+
}
|
|
15680
|
+
};
|
|
15681
|
+
revivers.set(schema, reviver);
|
|
15682
|
+
return reviver;
|
|
15683
|
+
};
|
|
15684
|
+
|
|
15685
|
+
|
|
15281
15686
|
},
|
|
15282
15687
|
76(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
15283
15688
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -15896,6 +16301,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
15896
16301
|
PGb: () => (/* reexport safe */ _schema__rspack_import_9.PG),
|
|
15897
16302
|
PPB: () => (/* reexport safe */ _plugins__rspack_import_7.PP),
|
|
15898
16303
|
PlD: () => (/* reexport safe */ _plugins__rspack_import_7.Pl),
|
|
16304
|
+
PlK: () => (/* reexport safe */ _expressions__rspack_import_4.Pl),
|
|
15899
16305
|
Pr0: () => (/* reexport safe */ _plugins__rspack_import_7.Pr),
|
|
15900
16306
|
Q7C: () => (/* reexport safe */ _results__rspack_import_8.Q7),
|
|
15901
16307
|
QBn: () => (/* reexport safe */ _plugins__rspack_import_7.QB),
|
|
@@ -15908,6 +16314,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
15908
16314
|
Smt: () => (/* reexport safe */ _expressions__rspack_import_4.Sm),
|
|
15909
16315
|
Sv9: () => (/* reexport safe */ _expressions__rspack_import_4.Sv),
|
|
15910
16316
|
TFx: () => (/* reexport safe */ _schema__rspack_import_9.TF),
|
|
16317
|
+
THL: () => (/* reexport safe */ _schema__rspack_import_9.TH),
|
|
15911
16318
|
Tlv: () => (/* reexport safe */ _codegen__rspack_import_1.Tl),
|
|
15912
16319
|
To4: () => (/* reexport safe */ _plugins__rspack_import_7.To),
|
|
15913
16320
|
UQ$: () => (/* reexport safe */ _pipeline__rspack_import_6.UQ),
|
|
@@ -16019,6 +16426,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
16019
16426
|
wSV: () => (/* reexport safe */ _expressions__rspack_import_4.wS),
|
|
16020
16427
|
w_n: () => (/* reexport safe */ _schema__rspack_import_9.w_),
|
|
16021
16428
|
wgE: () => (/* reexport safe */ _utilities__rspack_import_10.wg),
|
|
16429
|
+
wku: () => (/* reexport safe */ _plugins__rspack_import_7.wk),
|
|
16022
16430
|
wpC: () => (/* reexport safe */ _collections__rspack_import_2.wp),
|
|
16023
16431
|
wtA: () => (/* reexport safe */ _schema__rspack_import_9.wt),
|
|
16024
16432
|
xHv: () => (/* reexport safe */ _assertions__rspack_import_0.xH),
|
|
@@ -16040,9 +16448,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
16040
16448
|
/* import */ var _expressions__rspack_import_4 = __webpack_require__(138);
|
|
16041
16449
|
/* import */ var _performance__rspack_import_5 = __webpack_require__(971);
|
|
16042
16450
|
/* import */ var _pipeline__rspack_import_6 = __webpack_require__(314);
|
|
16043
|
-
/* import */ var _plugins__rspack_import_7 = __webpack_require__(
|
|
16451
|
+
/* import */ var _plugins__rspack_import_7 = __webpack_require__(756);
|
|
16044
16452
|
/* import */ var _results__rspack_import_8 = __webpack_require__(264);
|
|
16045
|
-
/* import */ var _schema__rspack_import_9 = __webpack_require__(
|
|
16453
|
+
/* import */ var _schema__rspack_import_9 = __webpack_require__(862);
|
|
16046
16454
|
/* import */ var _utilities__rspack_import_10 = __webpack_require__(222);
|
|
16047
16455
|
|
|
16048
16456
|
|
|
@@ -16190,6 +16598,7 @@ var __webpack_exports__forEach = __webpack_exports__.jJl;
|
|
|
16190
16598
|
var __webpack_exports__formatExplanation = __webpack_exports__.vZg;
|
|
16191
16599
|
var __webpack_exports__getLogLevel = __webpack_exports__.XML;
|
|
16192
16600
|
var __webpack_exports__getProperties = __webpack_exports__.oYS;
|
|
16601
|
+
var __webpack_exports__getStorageDateReviver = __webpack_exports__.THL;
|
|
16193
16602
|
var __webpack_exports__hasPrimitiveElements = __webpack_exports__.LLS;
|
|
16194
16603
|
var __webpack_exports__hash = __webpack_exports__.tWU;
|
|
16195
16604
|
var __webpack_exports__hashJoin = __webpack_exports__.Bg1;
|
|
@@ -16219,12 +16628,14 @@ var __webpack_exports__operandValue = __webpack_exports__.Vv5;
|
|
|
16219
16628
|
var __webpack_exports__parameter = __webpack_exports__.Wif;
|
|
16220
16629
|
var __webpack_exports__parameteriseDocument = __webpack_exports__.i1p;
|
|
16221
16630
|
var __webpack_exports__parseFragment = __webpack_exports__.oHM;
|
|
16631
|
+
var __webpack_exports__parseSelector = __webpack_exports__.PlK;
|
|
16222
16632
|
var __webpack_exports__peelCalls = __webpack_exports__.CCQ;
|
|
16223
16633
|
var __webpack_exports__propertyInfoToJsonSchema = __webpack_exports__.UXe;
|
|
16224
16634
|
var __webpack_exports__readJoinKey = __webpack_exports__.qyv;
|
|
16225
16635
|
var __webpack_exports__rehydrateSchemaFromJsonSchema = __webpack_exports__.L$j;
|
|
16226
16636
|
var __webpack_exports__rehydrateSchemaFromJsonString = __webpack_exports__.Dkq;
|
|
16227
16637
|
var __webpack_exports__renderCallAsJs = __webpack_exports__.axV;
|
|
16638
|
+
var __webpack_exports__reportRenamedProperties = __webpack_exports__.wku;
|
|
16228
16639
|
var __webpack_exports__resetLogLevel = __webpack_exports__.Cgm;
|
|
16229
16640
|
var __webpack_exports__resolveBulkPersistChanges = __webpack_exports__.apy;
|
|
16230
16641
|
var __webpack_exports__s = __webpack_exports__.s;
|
|
@@ -16247,6 +16658,6 @@ var __webpack_exports__uuid = __webpack_exports__.uRe;
|
|
|
16247
16658
|
var __webpack_exports__uuidv4 = __webpack_exports__.gZm;
|
|
16248
16659
|
var __webpack_exports__withExecutedQueries = __webpack_exports__.KgE;
|
|
16249
16660
|
var __webpack_exports__withInnerSide = __webpack_exports__.oJY;
|
|
16250
|
-
export { __webpack_exports__AndBuilder as AndBuilder, __webpack_exports__ArrayBuilder as ArrayBuilder, __webpack_exports__AssignmentBuilder as AssignmentBuilder, __webpack_exports__BatchingDbPlugin as BatchingDbPlugin, __webpack_exports__Block as Block, __webpack_exports__BulkPersistChanges as BulkPersistChanges, __webpack_exports__BulkPersistResult as BulkPersistResult, __webpack_exports__CALL_SOURCE as CALL_SOURCE, __webpack_exports__CacheDbPlugin as CacheDbPlugin, __webpack_exports__CallExpression as CallExpression, __webpack_exports__CodeBuilder as CodeBuilder, __webpack_exports__ComparatorExpression as ComparatorExpression, __webpack_exports__ConcurrencyDbPlugin as ConcurrencyDbPlugin, __webpack_exports__ContainerBlock as ContainerBlock, __webpack_exports__DATABASE_EXECUTION_EXPLANATIONS as DATABASE_EXECUTION_EXPLANATIONS, __webpack_exports__DEFAULT_SEMI_JOIN_KEY_THRESHOLD as DEFAULT_SEMI_JOIN_KEY_THRESHOLD, __webpack_exports__DataTranslator as DataTranslator, __webpack_exports__EXECUTED_QUERIES_UNSUPPORTED as EXECUTED_QUERIES_UNSUPPORTED, __webpack_exports__EXPRESSION_TYPES as EXPRESSION_TYPES, __webpack_exports__EmptyExpression as EmptyExpression, __webpack_exports__EphemeralDataPlugin as EphemeralDataPlugin, __webpack_exports__Expression as Expression, __webpack_exports__FOLDABLE as FOLDABLE, __webpack_exports__FunctionBuilder as FunctionBuilder, __webpack_exports__FunctionFactoryBuilder as FunctionFactoryBuilder, __webpack_exports__HashType as HashType, __webpack_exports__IdSet as IdSet, __webpack_exports__IfBuilder as IfBuilder, __webpack_exports__JsonTranslator as JsonTranslator, __webpack_exports__LOG_LEVELS as LOG_LEVELS, __webpack_exports__MEMORY_EXECUTION_EXPLANATIONS as MEMORY_EXECUTION_EXPLANATIONS, __webpack_exports__MemoryDataCollection as MemoryDataCollection, __webpack_exports__NotParsableExpression as NotParsableExpression, __webpack_exports__ObjectBuilder as ObjectBuilder, __webpack_exports__OperatorExpression as OperatorExpression, __webpack_exports__OptimisticConcurrencyError as OptimisticConcurrencyError, __webpack_exports__PluginDestroyedError as PluginDestroyedError, __webpack_exports__PluginEventResult as PluginEventResult, __webpack_exports__PropertyExpression as PropertyExpression, __webpack_exports__PropertyInfo as PropertyInfo, __webpack_exports__Query as Query, __webpack_exports__QueryOptionsCollection as QueryOptionsCollection, __webpack_exports__QueryOrdering as QueryOrdering, __webpack_exports__RawBuilder as RawBuilder, __webpack_exports__ReadonlySchemaCollection as ReadonlySchemaCollection, __webpack_exports__Result as Result, __webpack_exports__RetryDbPlugin as RetryDbPlugin, __webpack_exports__SchemaArray as SchemaArray, __webpack_exports__SchemaBase as SchemaBase, __webpack_exports__SchemaBoolean as SchemaBoolean, __webpack_exports__SchemaCollection as SchemaCollection, __webpack_exports__SchemaComputed as SchemaComputed, __webpack_exports__SchemaDate as SchemaDate, __webpack_exports__SchemaDefault as SchemaDefault, __webpack_exports__SchemaDefinition as SchemaDefinition, __webpack_exports__SchemaDeserialize as SchemaDeserialize, __webpack_exports__SchemaDistinct as SchemaDistinct, __webpack_exports__SchemaError as SchemaError, __webpack_exports__SchemaFile as SchemaFile, __webpack_exports__SchemaForeignKey as SchemaForeignKey, __webpack_exports__SchemaFrom as SchemaFrom, __webpack_exports__SchemaFunction as SchemaFunction, __webpack_exports__SchemaIdentity as SchemaIdentity, __webpack_exports__SchemaIndex as SchemaIndex, __webpack_exports__SchemaKey as SchemaKey, __webpack_exports__SchemaNullable as SchemaNullable, __webpack_exports__SchemaNumber as SchemaNumber, __webpack_exports__SchemaObject as SchemaObject, __webpack_exports__SchemaOptional as SchemaOptional, __webpack_exports__SchemaPersistChanges as SchemaPersistChanges, __webpack_exports__SchemaPersistResult as SchemaPersistResult, __webpack_exports__SchemaReadonly as SchemaReadonly, __webpack_exports__SchemaSearchable as SchemaSearchable, __webpack_exports__SchemaSerialize as SchemaSerialize, __webpack_exports__SchemaString as SchemaString, __webpack_exports__SchemaTag as SchemaTag, __webpack_exports__SchemaTracked as SchemaTracked, __webpack_exports__SchemaTransform as SchemaTransform, __webpack_exports__SchemaTypes as SchemaTypes, __webpack_exports__SchemaVector as SchemaVector, __webpack_exports__SlotBlock as SlotBlock, __webpack_exports__SqlTranslator as SqlTranslator, __webpack_exports__StringBuilder as StringBuilder, __webpack_exports__SyncronousQueue as SyncronousQueue, __webpack_exports__TagCollection as TagCollection, __webpack_exports__TelemetryDbPlugin as TelemetryDbPlugin, __webpack_exports__TrampolinePipeline as TrampolinePipeline, __webpack_exports__TranslatedArrayValue as TranslatedArrayValue, __webpack_exports__TranslatedGroupValue as TranslatedGroupValue, __webpack_exports__TranslatedSingleValue as TranslatedSingleValue, __webpack_exports__TupleTranslator as TupleTranslator, __webpack_exports__UNRESOLVED as UNRESOLVED, __webpack_exports__ValueExpression as ValueExpression, __webpack_exports__VariableBuilder as VariableBuilder, __webpack_exports__WorkPipeline as WorkPipeline, __webpack_exports__applyInnerOptions as applyInnerOptions, __webpack_exports__assertDate as assertDate, __webpack_exports__assertInstanceOf as assertInstanceOf, __webpack_exports__assertIsArray as assertIsArray, __webpack_exports__assertIsNotNull as assertIsNotNull, __webpack_exports__assertIsNumber as assertIsNumber, __webpack_exports__assertString as assertString, __webpack_exports__cast as cast, __webpack_exports__childrenOf as childrenOf, __webpack_exports__clone as clone, __webpack_exports__collectingSink as collectingSink, __webpack_exports__combineExpressions as combineExpressions, __webpack_exports__combineQueryOptionsCollections as combineQueryOptionsCollections, __webpack_exports__compiledSchemaToJsonSchema as compiledSchemaToJsonSchema, __webpack_exports__cosineDistance as cosineDistance, __webpack_exports__createRequestHandler as createRequestHandler, __webpack_exports__createStandardJsonSchemaProps as createStandardJsonSchemaProps, __webpack_exports__describeFilterAsJs as describeFilterAsJs, __webpack_exports__describeFilters as describeFilters, __webpack_exports__describeUnparsableFilter as describeUnparsableFilter, __webpack_exports__deserializeBulkPersist as deserializeBulkPersist, __webpack_exports__deserializePersistResult as deserializePersistResult, __webpack_exports__deserializeQueryOptions as deserializeQueryOptions, __webpack_exports__distinctJoinKeys as distinctJoinKeys, __webpack_exports__evaluate as evaluate, __webpack_exports__executeJoin as executeJoin, __webpack_exports__executedQueriesOf as executedQueriesOf, __webpack_exports__explainQuery as explainQuery, __webpack_exports__extractTypeInfo as extractTypeInfo, __webpack_exports__fastHash as fastHash, __webpack_exports__foldConstantCalls as foldConstantCalls, __webpack_exports__foldedOperandValue as foldedOperandValue, __webpack_exports__forEach as forEach, __webpack_exports__formatExplanation as formatExplanation, __webpack_exports__getLogLevel as getLogLevel, __webpack_exports__getProperties as getProperties, __webpack_exports__hasPrimitiveElements as hasPrimitiveElements, __webpack_exports__hash as hash, __webpack_exports__hashJoin as hashJoin, __webpack_exports__isArrayValued as isArrayValued, __webpack_exports__isCallExpression as isCallExpression, __webpack_exports__isComparatorExpression as isComparatorExpression, __webpack_exports__isDatabaseStep as isDatabaseStep, __webpack_exports__isDate as isDate, __webpack_exports__isEmptyExpression as isEmptyExpression, __webpack_exports__isExpression as isExpression, __webpack_exports__isLogLevelEnabled as isLogLevelEnabled, __webpack_exports__isNodeRuntime as isNodeRuntime, __webpack_exports__isNotParsableExpression as isNotParsableExpression, __webpack_exports__isOperatorExpression as isOperatorExpression, __webpack_exports__isPropertyExpression as isPropertyExpression, __webpack_exports__isValueExpression as isValueExpression, __webpack_exports__joinInPlugin as joinInPlugin, __webpack_exports__loadJoinInnerSide as loadJoinInnerSide, __webpack_exports__logger as logger, __webpack_exports__loggerSink as loggerSink, __webpack_exports__mappedResultColumns as mappedResultColumns, __webpack_exports__measure as measure, __webpack_exports__nearestBy as nearestBy, __webpack_exports__noop as noop, __webpack_exports__now as now, __webpack_exports__operandValue as operandValue, __webpack_exports__parameter as parameter, __webpack_exports__parameteriseDocument as parameteriseDocument, __webpack_exports__parseFragment as parseFragment, __webpack_exports__peelCalls as peelCalls, __webpack_exports__propertyInfoToJsonSchema as propertyInfoToJsonSchema, __webpack_exports__readJoinKey as readJoinKey, __webpack_exports__rehydrateSchemaFromJsonSchema as rehydrateSchemaFromJsonSchema, __webpack_exports__rehydrateSchemaFromJsonString as rehydrateSchemaFromJsonString, __webpack_exports__renderCallAsJs as renderCallAsJs, __webpack_exports__resetLogLevel as resetLogLevel, __webpack_exports__resolveBulkPersistChanges as resolveBulkPersistChanges, __webpack_exports__s as s, __webpack_exports__semiJoinFilter as semiJoinFilter, __webpack_exports__serializeBulkPersist as serializeBulkPersist, __webpack_exports__serializePersistResult as serializePersistResult, __webpack_exports__serializeQueryOptions as serializeQueryOptions, __webpack_exports__setLogLevel as setLogLevel, __webpack_exports__splitSendableOptions as splitSendableOptions, __webpack_exports__stringifyObject as stringifyObject, __webpack_exports__toEntityShape as toEntityShape, __webpack_exports__toEventArray as toEventArray, __webpack_exports__toExpression as toExpression, __webpack_exports__toMap as toMap, __webpack_exports__toPredicate as toPredicate, __webpack_exports__toPromise as toPromise, __webpack_exports__toStrictPredicate as toStrictPredicate, __webpack_exports__unsafeCast as unsafeCast, __webpack_exports__uuid as uuid, __webpack_exports__uuidv4 as uuidv4, __webpack_exports__withExecutedQueries as withExecutedQueries, __webpack_exports__withInnerSide as withInnerSide };
|
|
16661
|
+
export { __webpack_exports__AndBuilder as AndBuilder, __webpack_exports__ArrayBuilder as ArrayBuilder, __webpack_exports__AssignmentBuilder as AssignmentBuilder, __webpack_exports__BatchingDbPlugin as BatchingDbPlugin, __webpack_exports__Block as Block, __webpack_exports__BulkPersistChanges as BulkPersistChanges, __webpack_exports__BulkPersistResult as BulkPersistResult, __webpack_exports__CALL_SOURCE as CALL_SOURCE, __webpack_exports__CacheDbPlugin as CacheDbPlugin, __webpack_exports__CallExpression as CallExpression, __webpack_exports__CodeBuilder as CodeBuilder, __webpack_exports__ComparatorExpression as ComparatorExpression, __webpack_exports__ConcurrencyDbPlugin as ConcurrencyDbPlugin, __webpack_exports__ContainerBlock as ContainerBlock, __webpack_exports__DATABASE_EXECUTION_EXPLANATIONS as DATABASE_EXECUTION_EXPLANATIONS, __webpack_exports__DEFAULT_SEMI_JOIN_KEY_THRESHOLD as DEFAULT_SEMI_JOIN_KEY_THRESHOLD, __webpack_exports__DataTranslator as DataTranslator, __webpack_exports__EXECUTED_QUERIES_UNSUPPORTED as EXECUTED_QUERIES_UNSUPPORTED, __webpack_exports__EXPRESSION_TYPES as EXPRESSION_TYPES, __webpack_exports__EmptyExpression as EmptyExpression, __webpack_exports__EphemeralDataPlugin as EphemeralDataPlugin, __webpack_exports__Expression as Expression, __webpack_exports__FOLDABLE as FOLDABLE, __webpack_exports__FunctionBuilder as FunctionBuilder, __webpack_exports__FunctionFactoryBuilder as FunctionFactoryBuilder, __webpack_exports__HashType as HashType, __webpack_exports__IdSet as IdSet, __webpack_exports__IfBuilder as IfBuilder, __webpack_exports__JsonTranslator as JsonTranslator, __webpack_exports__LOG_LEVELS as LOG_LEVELS, __webpack_exports__MEMORY_EXECUTION_EXPLANATIONS as MEMORY_EXECUTION_EXPLANATIONS, __webpack_exports__MemoryDataCollection as MemoryDataCollection, __webpack_exports__NotParsableExpression as NotParsableExpression, __webpack_exports__ObjectBuilder as ObjectBuilder, __webpack_exports__OperatorExpression as OperatorExpression, __webpack_exports__OptimisticConcurrencyError as OptimisticConcurrencyError, __webpack_exports__PluginDestroyedError as PluginDestroyedError, __webpack_exports__PluginEventResult as PluginEventResult, __webpack_exports__PropertyExpression as PropertyExpression, __webpack_exports__PropertyInfo as PropertyInfo, __webpack_exports__Query as Query, __webpack_exports__QueryOptionsCollection as QueryOptionsCollection, __webpack_exports__QueryOrdering as QueryOrdering, __webpack_exports__RawBuilder as RawBuilder, __webpack_exports__ReadonlySchemaCollection as ReadonlySchemaCollection, __webpack_exports__Result as Result, __webpack_exports__RetryDbPlugin as RetryDbPlugin, __webpack_exports__SchemaArray as SchemaArray, __webpack_exports__SchemaBase as SchemaBase, __webpack_exports__SchemaBoolean as SchemaBoolean, __webpack_exports__SchemaCollection as SchemaCollection, __webpack_exports__SchemaComputed as SchemaComputed, __webpack_exports__SchemaDate as SchemaDate, __webpack_exports__SchemaDefault as SchemaDefault, __webpack_exports__SchemaDefinition as SchemaDefinition, __webpack_exports__SchemaDeserialize as SchemaDeserialize, __webpack_exports__SchemaDistinct as SchemaDistinct, __webpack_exports__SchemaError as SchemaError, __webpack_exports__SchemaFile as SchemaFile, __webpack_exports__SchemaForeignKey as SchemaForeignKey, __webpack_exports__SchemaFrom as SchemaFrom, __webpack_exports__SchemaFunction as SchemaFunction, __webpack_exports__SchemaIdentity as SchemaIdentity, __webpack_exports__SchemaIndex as SchemaIndex, __webpack_exports__SchemaKey as SchemaKey, __webpack_exports__SchemaNullable as SchemaNullable, __webpack_exports__SchemaNumber as SchemaNumber, __webpack_exports__SchemaObject as SchemaObject, __webpack_exports__SchemaOptional as SchemaOptional, __webpack_exports__SchemaPersistChanges as SchemaPersistChanges, __webpack_exports__SchemaPersistResult as SchemaPersistResult, __webpack_exports__SchemaReadonly as SchemaReadonly, __webpack_exports__SchemaSearchable as SchemaSearchable, __webpack_exports__SchemaSerialize as SchemaSerialize, __webpack_exports__SchemaString as SchemaString, __webpack_exports__SchemaTag as SchemaTag, __webpack_exports__SchemaTracked as SchemaTracked, __webpack_exports__SchemaTransform as SchemaTransform, __webpack_exports__SchemaTypes as SchemaTypes, __webpack_exports__SchemaVector as SchemaVector, __webpack_exports__SlotBlock as SlotBlock, __webpack_exports__SqlTranslator as SqlTranslator, __webpack_exports__StringBuilder as StringBuilder, __webpack_exports__SyncronousQueue as SyncronousQueue, __webpack_exports__TagCollection as TagCollection, __webpack_exports__TelemetryDbPlugin as TelemetryDbPlugin, __webpack_exports__TrampolinePipeline as TrampolinePipeline, __webpack_exports__TranslatedArrayValue as TranslatedArrayValue, __webpack_exports__TranslatedGroupValue as TranslatedGroupValue, __webpack_exports__TranslatedSingleValue as TranslatedSingleValue, __webpack_exports__TupleTranslator as TupleTranslator, __webpack_exports__UNRESOLVED as UNRESOLVED, __webpack_exports__ValueExpression as ValueExpression, __webpack_exports__VariableBuilder as VariableBuilder, __webpack_exports__WorkPipeline as WorkPipeline, __webpack_exports__applyInnerOptions as applyInnerOptions, __webpack_exports__assertDate as assertDate, __webpack_exports__assertInstanceOf as assertInstanceOf, __webpack_exports__assertIsArray as assertIsArray, __webpack_exports__assertIsNotNull as assertIsNotNull, __webpack_exports__assertIsNumber as assertIsNumber, __webpack_exports__assertString as assertString, __webpack_exports__cast as cast, __webpack_exports__childrenOf as childrenOf, __webpack_exports__clone as clone, __webpack_exports__collectingSink as collectingSink, __webpack_exports__combineExpressions as combineExpressions, __webpack_exports__combineQueryOptionsCollections as combineQueryOptionsCollections, __webpack_exports__compiledSchemaToJsonSchema as compiledSchemaToJsonSchema, __webpack_exports__cosineDistance as cosineDistance, __webpack_exports__createRequestHandler as createRequestHandler, __webpack_exports__createStandardJsonSchemaProps as createStandardJsonSchemaProps, __webpack_exports__describeFilterAsJs as describeFilterAsJs, __webpack_exports__describeFilters as describeFilters, __webpack_exports__describeUnparsableFilter as describeUnparsableFilter, __webpack_exports__deserializeBulkPersist as deserializeBulkPersist, __webpack_exports__deserializePersistResult as deserializePersistResult, __webpack_exports__deserializeQueryOptions as deserializeQueryOptions, __webpack_exports__distinctJoinKeys as distinctJoinKeys, __webpack_exports__evaluate as evaluate, __webpack_exports__executeJoin as executeJoin, __webpack_exports__executedQueriesOf as executedQueriesOf, __webpack_exports__explainQuery as explainQuery, __webpack_exports__extractTypeInfo as extractTypeInfo, __webpack_exports__fastHash as fastHash, __webpack_exports__foldConstantCalls as foldConstantCalls, __webpack_exports__foldedOperandValue as foldedOperandValue, __webpack_exports__forEach as forEach, __webpack_exports__formatExplanation as formatExplanation, __webpack_exports__getLogLevel as getLogLevel, __webpack_exports__getProperties as getProperties, __webpack_exports__getStorageDateReviver as getStorageDateReviver, __webpack_exports__hasPrimitiveElements as hasPrimitiveElements, __webpack_exports__hash as hash, __webpack_exports__hashJoin as hashJoin, __webpack_exports__isArrayValued as isArrayValued, __webpack_exports__isCallExpression as isCallExpression, __webpack_exports__isComparatorExpression as isComparatorExpression, __webpack_exports__isDatabaseStep as isDatabaseStep, __webpack_exports__isDate as isDate, __webpack_exports__isEmptyExpression as isEmptyExpression, __webpack_exports__isExpression as isExpression, __webpack_exports__isLogLevelEnabled as isLogLevelEnabled, __webpack_exports__isNodeRuntime as isNodeRuntime, __webpack_exports__isNotParsableExpression as isNotParsableExpression, __webpack_exports__isOperatorExpression as isOperatorExpression, __webpack_exports__isPropertyExpression as isPropertyExpression, __webpack_exports__isValueExpression as isValueExpression, __webpack_exports__joinInPlugin as joinInPlugin, __webpack_exports__loadJoinInnerSide as loadJoinInnerSide, __webpack_exports__logger as logger, __webpack_exports__loggerSink as loggerSink, __webpack_exports__mappedResultColumns as mappedResultColumns, __webpack_exports__measure as measure, __webpack_exports__nearestBy as nearestBy, __webpack_exports__noop as noop, __webpack_exports__now as now, __webpack_exports__operandValue as operandValue, __webpack_exports__parameter as parameter, __webpack_exports__parameteriseDocument as parameteriseDocument, __webpack_exports__parseFragment as parseFragment, __webpack_exports__parseSelector as parseSelector, __webpack_exports__peelCalls as peelCalls, __webpack_exports__propertyInfoToJsonSchema as propertyInfoToJsonSchema, __webpack_exports__readJoinKey as readJoinKey, __webpack_exports__rehydrateSchemaFromJsonSchema as rehydrateSchemaFromJsonSchema, __webpack_exports__rehydrateSchemaFromJsonString as rehydrateSchemaFromJsonString, __webpack_exports__renderCallAsJs as renderCallAsJs, __webpack_exports__reportRenamedProperties as reportRenamedProperties, __webpack_exports__resetLogLevel as resetLogLevel, __webpack_exports__resolveBulkPersistChanges as resolveBulkPersistChanges, __webpack_exports__s as s, __webpack_exports__semiJoinFilter as semiJoinFilter, __webpack_exports__serializeBulkPersist as serializeBulkPersist, __webpack_exports__serializePersistResult as serializePersistResult, __webpack_exports__serializeQueryOptions as serializeQueryOptions, __webpack_exports__setLogLevel as setLogLevel, __webpack_exports__splitSendableOptions as splitSendableOptions, __webpack_exports__stringifyObject as stringifyObject, __webpack_exports__toEntityShape as toEntityShape, __webpack_exports__toEventArray as toEventArray, __webpack_exports__toExpression as toExpression, __webpack_exports__toMap as toMap, __webpack_exports__toPredicate as toPredicate, __webpack_exports__toPromise as toPromise, __webpack_exports__toStrictPredicate as toStrictPredicate, __webpack_exports__unsafeCast as unsafeCast, __webpack_exports__uuid as uuid, __webpack_exports__uuidv4 as uuidv4, __webpack_exports__withExecutedQueries as withExecutedQueries, __webpack_exports__withInnerSide as withInnerSide };
|
|
16251
16662
|
|
|
16252
16663
|
//# sourceMappingURL=index.js.map
|