@routier/core 0.1.0-rc.0 → 0.1.0-rc.2

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/index.js CHANGED
@@ -173,10 +173,12 @@ __webpack_require__.r(__webpack_exports__);
173
173
  __webpack_require__.d(__webpack_exports__, {
174
174
  PerformanceCapability: () => (PerformanceCapability)
175
175
  });
176
- /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utilities */ "./src/utilities/strings.ts");
176
+ /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities */ "./src/utilities/strings.ts");
177
177
  /* ESM import */var _Capability__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Capability */ "./src/capabilities/Capability.ts");
178
178
  /* ESM import */var _performance_PerformanceTracker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./performance/PerformanceTracker */ "./src/capabilities/performance/PerformanceTracker.ts");
179
179
  /* ESM import */var _tracing_CallTraceManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tracing/CallTraceManager */ "./src/capabilities/tracing/CallTraceManager.ts");
180
+ /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utilities */ "./src/utilities/logger.ts");
181
+
180
182
 
181
183
 
182
184
 
@@ -212,12 +214,12 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
212
214
  depth = callTrace.length - 1;
213
215
  const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);
214
216
  this.performanceTracker.startMethodTiming(operationId, path);
215
- console.log(`\n${'═'.repeat(60)}`);
216
- console.log(`▶ ORIGIN [${operationId}] ${path}`);
217
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`\n${'═'.repeat(60)}`);
218
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`▶ ORIGIN [${operationId}] ${path}`);
217
219
  if (args.length > 0) {
218
- console.log(` Args:`, (0,_utilities__WEBPACK_IMPORTED_MODULE_3__.stringifyObject)(args, 4, 0));
220
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(` Args:`, (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.stringifyObject)(args, 4, 0));
219
221
  }
220
- console.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);
222
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);
221
223
  }
222
224
  else {
223
225
  operationId = this.callTraceManager.getActiveOperationId();
@@ -228,9 +230,9 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
228
230
  const childMethodKey = `${operationId}:${path}`;
229
231
  this.childDurations.set(childMethodKey, []);
230
232
  this.performanceTracker.startMethodTiming(operationId, path);
231
- console.log(`${indent}└─ CHILD [${operationId}] ${path}`);
233
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`${indent}└─ CHILD [${operationId}] ${path}`);
232
234
  if (args.length > 0) {
233
- console.log(`${indent} Args:`, (0,_utilities__WEBPACK_IMPORTED_MODULE_3__.stringifyObject)(args, 4, 0));
235
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`${indent} Args:`, (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.stringifyObject)(args, 4, 0));
234
236
  }
235
237
  }
236
238
  try {
@@ -246,14 +248,14 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
246
248
  const formattedTotalChildTime = this.performanceTracker.formatDuration(totalChildTime);
247
249
  const overhead = duration - totalChildTime;
248
250
  const formattedOverhead = this.performanceTracker.formatDuration(Math.max(0, overhead));
249
- console.log(`\n${'═'.repeat(60)}`);
250
- console.log(`◀ COMPLETE [${operationId}] ${path}`);
251
- console.log(` Total Duration: ${formattedDuration}`);
251
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`\n${'═'.repeat(60)}`);
252
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`◀ COMPLETE [${operationId}] ${path}`);
253
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(` Total Duration: ${formattedDuration}`);
252
254
  if (childDurations.length > 0) {
253
- console.log(` Children Duration: ${formattedTotalChildTime} (${childDurations.length} calls)`);
254
- console.log(` Overhead: ${formattedOverhead}`);
255
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(` Children Duration: ${formattedTotalChildTime} (${childDurations.length} calls)`);
256
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(` Overhead: ${formattedOverhead}`);
255
257
  }
256
- console.log(`${'═'.repeat(60)}\n`);
258
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`${'═'.repeat(60)}\n`);
257
259
  this.childDurations.delete(operationId);
258
260
  this.performanceTracker.cleanupOperation(operationId);
259
261
  this.callTraceManager.endOperation();
@@ -266,9 +268,9 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
266
268
  const formattedTotalChildTime = this.performanceTracker.formatDuration(totalChildTime);
267
269
  const overhead = duration - totalChildTime;
268
270
  const formattedOverhead = this.performanceTracker.formatDuration(Math.max(0, overhead));
269
- console.log(`${indent} ✓ ${formattedDuration}`);
271
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`${indent} ✓ ${formattedDuration}`);
270
272
  if (childDurations.length > 0) {
271
- console.log(`${indent} Children: ${formattedTotalChildTime} (${childDurations.length} calls), Overhead: ${formattedOverhead}`);
273
+ _utilities__WEBPACK_IMPORTED_MODULE_3__.logger.log(`${indent} Children: ${formattedTotalChildTime} (${childDurations.length} calls), Overhead: ${formattedOverhead}`);
272
274
  }
273
275
  // Clean up child method tracking
274
276
  this.childDurations.delete(childMethodKey);
@@ -317,7 +319,9 @@ __webpack_require__.d(__webpack_exports__, {
317
319
  });
318
320
  /* ESM import */var _Capability__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Capability */ "./src/capabilities/Capability.ts");
319
321
  /* ESM import */var _tracing_CallTraceManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tracing/CallTraceManager */ "./src/capabilities/tracing/CallTraceManager.ts");
320
- /* ESM import */var _utilities_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utilities/strings */ "./src/utilities/strings.ts");
322
+ /* ESM import */var _utilities_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utilities/strings */ "./src/utilities/strings.ts");
323
+ /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utilities */ "./src/utilities/logger.ts");
324
+
321
325
 
322
326
 
323
327
 
@@ -344,20 +348,20 @@ class TracingCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Capabil
344
348
  operationId = this.callTraceManager.startNewOperation();
345
349
  const callTrace = this.callTraceManager.addMethodToTrace(path);
346
350
  const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);
347
- console.log(`\n${'═'.repeat(60)}`);
348
- console.log(`▶ ORIGIN [${operationId}] ${path}`);
351
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.logger.log(`\n${'═'.repeat(60)}`);
352
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.logger.log(`▶ ORIGIN [${operationId}] ${path}`);
349
353
  if (args.length > 0) {
350
- console.log(` Args:`, (0,_utilities_strings__WEBPACK_IMPORTED_MODULE_2__.stringifyObject)(args, 4, 0));
354
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.logger.log(` Args:`, (0,_utilities_strings__WEBPACK_IMPORTED_MODULE_3__.stringifyObject)(args, 4, 0));
351
355
  }
352
- console.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);
356
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.logger.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);
353
357
  }
354
358
  else {
355
359
  operationId = this.callTraceManager.getActiveOperationId();
356
360
  const callTrace = this.callTraceManager.addMethodToTrace(path);
357
361
  const indent = ' '.repeat(Math.min(callTrace.length - 1, 4));
358
- console.log(`${indent}└─ CHILD [${operationId}] ${path}`);
362
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.logger.log(`${indent}└─ CHILD [${operationId}] ${path}`);
359
363
  if (args.length > 0) {
360
- console.log(`${indent} Args:`, (0,_utilities_strings__WEBPACK_IMPORTED_MODULE_2__.stringifyObject)(args, 4, 0));
364
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.logger.log(`${indent} Args:`, (0,_utilities_strings__WEBPACK_IMPORTED_MODULE_3__.stringifyObject)(args, 4, 0));
361
365
  }
362
366
  }
363
367
  try {
@@ -3676,6 +3680,16 @@ class MemoryDataCollection {
3676
3680
  this.nextNumericalIds.set(property.id, nextId);
3677
3681
  return nextId;
3678
3682
  }
3683
+ resolveId(property, value) {
3684
+ if (typeof value !== "number") {
3685
+ return;
3686
+ }
3687
+ const currentIdForProperty = this.nextNumericalIds.get(property.id);
3688
+ if (value <= currentIdForProperty) {
3689
+ return;
3690
+ }
3691
+ this.nextNumericalIds.set(property.id, value);
3692
+ }
3679
3693
  getAndSetId(item, property) {
3680
3694
  if (item[property.name] != null) {
3681
3695
  return item[property.name];
@@ -3714,14 +3728,20 @@ class MemoryDataCollection {
3714
3728
  }
3715
3729
  resolveIdSet(item) {
3716
3730
  if (this.schema.hasIdentityKeys) {
3717
- const ids = [];
3718
3731
  const idProperties = this.schema.idProperties;
3732
+ const ids = new Array(idProperties.length);
3733
+ // Need to make sure we allow for seeding the collection when we call add vs seed
3734
+ // There will be an existing id, but the id type could still be identity
3719
3735
  if (idProperties.length === 1) {
3720
- ids.push(this.getAndSetId(item, idProperties[0]));
3736
+ const value = this.getAndSetId(item, idProperties[0]);
3737
+ this.resolveId(idProperties[0], value);
3738
+ ids[0] = value;
3721
3739
  }
3722
3740
  else {
3723
3741
  for (let j = 0, l = idProperties.length; j < l; j++) {
3724
- ids.push(this.getAndSetId(item, idProperties[j]));
3742
+ const value = this.getAndSetId(item, idProperties[j]);
3743
+ this.resolveId(idProperties[j], value);
3744
+ ids[j] = value;
3725
3745
  }
3726
3746
  }
3727
3747
  return new _IdSet__WEBPACK_IMPORTED_MODULE_2__.IdSet(...ids);
@@ -3998,10 +4018,12 @@ __webpack_require__.d(__webpack_exports__, {
3998
4018
  combineExpressions: () => (combineExpressions),
3999
4019
  toExpression: () => (toExpression)
4000
4020
  });
4021
+ /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utilities */ "./src/utilities/logger.ts");
4001
4022
  /* ESM import */var _assertions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../assertions */ "./src/assertions/index.ts");
4002
4023
  /* ESM import */var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types */ "./src/expressions/types.ts");
4003
4024
 
4004
4025
 
4026
+
4005
4027
  // Pre-compiled regex patterns for better performance
4006
4028
  const METHOD_REGEX = /([a-zA-Z0-9_.]+)\.(startsWith|endsWith|includes)\(([^)]+)\)(\s*(===|==|!==|!=)\s*(true|false))?/;
4007
4029
  const TRANSFORM_METHOD_REGEX = /([a-zA-Z0-9_.]+)\.(toLowerCase|toUpperCase|toLocaleLowerCase|toLocaleUpperCase)\(\)\.(startsWith|endsWith|includes)\(((?:[^()]|\([^)]*\))*)\)(\s*(===|==|!==|!=)\s*(true|false))?/;
@@ -4149,7 +4171,7 @@ const toExpression = (schema, fn, params) => {
4149
4171
  return parseExpressionToTree(schema, expression, parameterData);
4150
4172
  }
4151
4173
  catch (error) {
4152
- console.warn("Error parsing expression", {
4174
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.logger.warn("Error parsing expression", {
4153
4175
  error,
4154
4176
  collectionName: schema.collectionName,
4155
4177
  params,
@@ -4886,6 +4908,8 @@ __webpack_require__.d(__webpack_exports__, {
4886
4908
  measure: () => (measure),
4887
4909
  now: () => (now)
4888
4910
  });
4911
+ /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utilities */ "./src/utilities/logger.ts");
4912
+
4889
4913
  const measurements = {};
4890
4914
  const now = () => {
4891
4915
  if (typeof performance !== 'undefined' && performance.now) {
@@ -4903,7 +4927,7 @@ const measure = {
4903
4927
  const start = measurements[name];
4904
4928
  delete measurements[name];
4905
4929
  const delta = now() - start;
4906
- console.log(`[ROUTIER] - Performance: ${name} took ${delta}`);
4930
+ _utilities__WEBPACK_IMPORTED_MODULE_0__.logger.log(`[ROUTIER] - Performance: ${name} took ${delta}`);
4907
4931
  }
4908
4932
  };
4909
4933
 
@@ -4950,11 +4974,12 @@ class SyncronousQueue {
4950
4974
  (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4951
4975
  __webpack_require__.r(__webpack_exports__);
4952
4976
  __webpack_require__.d(__webpack_exports__, {
4953
- AsyncPipeline: () => (AsyncPipeline),
4954
4977
  TrampolinePipeline: () => (TrampolinePipeline),
4955
4978
  WorkPipeline: () => (WorkPipeline)
4956
4979
  });
4957
- /* ESM import */var _results__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../results */ "./src/results/Result.ts");
4980
+ /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utilities */ "./src/utilities/logger.ts");
4981
+ /* ESM import */var _results__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../results */ "./src/results/Result.ts");
4982
+
4958
4983
 
4959
4984
  class TrampolinePipeline {
4960
4985
  _list = [];
@@ -4992,7 +5017,7 @@ class TrampolinePipeline {
4992
5017
  processor(currentData, (result, error) => {
4993
5018
  // --- Error Handling ---
4994
5019
  if (error) {
4995
- console.error(`Error reported by processor at index ${idx}:`, error);
5020
+ _utilities__WEBPACK_IMPORTED_MODULE_0__.logger.error(`Error reported by processor at index ${idx}:`, error);
4996
5021
  this._hasErrored = true; // Set flag
4997
5022
  // Throw the error to be caught by outer try...catch blocks
4998
5023
  throw error;
@@ -5015,7 +5040,7 @@ class TrampolinePipeline {
5015
5040
  }
5016
5041
  catch (error) {
5017
5042
  if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback
5018
- console.error(`Error thrown by processor at index ${idx} or its callback:`, error);
5043
+ _utilities__WEBPACK_IMPORTED_MODULE_0__.logger.error(`Error thrown by processor at index ${idx} or its callback:`, error);
5019
5044
  this._hasErrored = true;
5020
5045
  }
5021
5046
  // Rethrow to be caught by the trampoline's catch block
@@ -5050,7 +5075,7 @@ class TrampolinePipeline {
5050
5075
  catch (trampolineError) {
5051
5076
  // Catch errors propagated from step execution (processor or callback errors)
5052
5077
  if (!this._hasErrored) { // Avoid double logging
5053
- console.error("Error during trampoline step execution:", trampolineError);
5078
+ _utilities__WEBPACK_IMPORTED_MODULE_0__.logger.error("Error during trampoline step execution:", trampolineError);
5054
5079
  this._hasErrored = true;
5055
5080
  }
5056
5081
  currentStep = null; // Stop the loop
@@ -5079,135 +5104,11 @@ class TrampolinePipeline {
5079
5104
  pipeEach(items, fn, map) {
5080
5105
  for (let i = 0, length = items.length; i < length; i++) {
5081
5106
  this.pipe((previous, done) => {
5082
- fn(map(previous, _results__WEBPACK_IMPORTED_MODULE_0__.Result.success(items[i])), done);
5107
+ fn(map(previous, _results__WEBPACK_IMPORTED_MODULE_1__.Result.success(items[i])), done);
5083
5108
  });
5084
5109
  }
5085
5110
  }
5086
5111
  }
5087
- class AsyncPipeline {
5088
- _list = [];
5089
- _hasErrored = false; // Flag to prevent calling done on error
5090
- filter(done) {
5091
- this._hasErrored = false; // Reset error flag on new execution
5092
- let currentData = [];
5093
- if (this._list.length === 0) {
5094
- queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success()));
5095
- return;
5096
- }
5097
- let index = 0;
5098
- let isRunning = false; // Guard against overlapping trampoline calls
5099
- try {
5100
- // --- Revised Completion Logic --- (Moved up for clarity)
5101
- const finalStepSentinel = () => {
5102
- // Only call done if no error has occurred
5103
- if (!this._hasErrored) {
5104
- queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success(currentData)));
5105
- }
5106
- return null; // Stop the trampoline
5107
- };
5108
- const createStepRevised = (idx) => {
5109
- return () => {
5110
- if (this._hasErrored)
5111
- return null; // Stop if an error occurred elsewhere
5112
- if (idx >= this._list.length) {
5113
- return finalStepSentinel(); // Execute the dedicated final step
5114
- }
5115
- const [payload, processor] = this._list[idx];
5116
- // Initialize syncCallbackResult to null to satisfy StepResult type
5117
- let syncCallbackResult = null;
5118
- let calledSync = false;
5119
- try {
5120
- processor(payload, (result) => {
5121
- // --- Error Handling ---
5122
- if (result.ok === _results__WEBPACK_IMPORTED_MODULE_0__.Result.ERROR) {
5123
- console.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);
5124
- this._hasErrored = true; // Set flag
5125
- // Throw the error to be caught by outer try...catch blocks
5126
- throw result.error;
5127
- }
5128
- // --- /Error Handling ---
5129
- // If no error, proceed as before
5130
- currentData.push(result.data);
5131
- index = idx + 1; // Update index for the next step
5132
- const nextStep = createStepRevised(index); // Use updated index
5133
- if (isRunning) {
5134
- // Callback was synchronous
5135
- syncCallbackResult = nextStep; // Store next step function
5136
- calledSync = true;
5137
- }
5138
- else {
5139
- // Callback was asynchronous, restart trampoline
5140
- trampoline(nextStep);
5141
- }
5142
- });
5143
- }
5144
- catch (error) {
5145
- if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback
5146
- console.error(`Error thrown by processor at index ${idx} or its callback:`, error);
5147
- this._hasErrored = true;
5148
- }
5149
- // Rethrow to be caught by the trampoline's catch block
5150
- throw error;
5151
- }
5152
- if (calledSync) {
5153
- // Return the next step function for the sync loop
5154
- return syncCallbackResult;
5155
- }
5156
- else {
5157
- // Pause trampoline for async, loop will stop as step returns null
5158
- return null;
5159
- }
5160
- };
5161
- };
5162
- // The trampoline loop
5163
- const trampoline = (step) => {
5164
- if (isRunning) {
5165
- return;
5166
- }
5167
- isRunning = true;
5168
- let currentStep = step;
5169
- while (typeof currentStep === 'function') {
5170
- try {
5171
- // Stop immediately if an error was flagged elsewhere
5172
- if (this._hasErrored) {
5173
- currentStep = null;
5174
- break;
5175
- }
5176
- currentStep = currentStep(); // Execute step, get next step or null
5177
- }
5178
- catch (trampolineError) {
5179
- // Catch errors propagated from step execution (processor or callback errors)
5180
- if (!this._hasErrored) { // Avoid double logging
5181
- console.error("Error during trampoline step execution:", trampolineError);
5182
- this._hasErrored = true;
5183
- }
5184
- currentStep = null; // Stop the loop
5185
- // We don't call `done` here because an error occurred.
5186
- // The application should handle the uncaught exception if desired.
5187
- break; // Explicitly break loop on error
5188
- }
5189
- }
5190
- // Loop ends when currentStep is null or loop is broken by error
5191
- isRunning = false;
5192
- // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.
5193
- };
5194
- // --- Start the process ---
5195
- index = 0; // Reset index
5196
- trampoline(createStepRevised(0)); // Start with the revised step creator
5197
- }
5198
- catch (error) {
5199
- done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.error(error));
5200
- }
5201
- }
5202
- pipe(data, processor) {
5203
- this._list.push([data, processor]);
5204
- }
5205
- pipeEach(items, processor) {
5206
- for (let i = 0, length = items.length; i < length; i++) {
5207
- this.pipe(items[i], processor);
5208
- }
5209
- }
5210
- }
5211
5112
  /**
5212
5113
  * Processes functions with callbacks asynchronously.
5213
5114
  *
@@ -5221,7 +5122,7 @@ class WorkPipeline {
5221
5122
  filter(done) {
5222
5123
  this._hasErrored = false; // Reset error flag on new execution
5223
5124
  if (this.unitsOfWork.length === 0) {
5224
- queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success()));
5125
+ queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_1__.Result.success()));
5225
5126
  return;
5226
5127
  }
5227
5128
  let index = 0;
@@ -5231,7 +5132,7 @@ class WorkPipeline {
5231
5132
  const finalStepSentinel = () => {
5232
5133
  // Only call done if no error has occurred
5233
5134
  if (!this._hasErrored) {
5234
- queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success()));
5135
+ queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_1__.Result.success()));
5235
5136
  }
5236
5137
  return null; // Stop the trampoline
5237
5138
  };
@@ -5249,8 +5150,8 @@ class WorkPipeline {
5249
5150
  try {
5250
5151
  processor((result) => {
5251
5152
  // --- Error Handling ---
5252
- if (result.ok === _results__WEBPACK_IMPORTED_MODULE_0__.Result.ERROR) {
5253
- console.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);
5153
+ if (result.ok === _results__WEBPACK_IMPORTED_MODULE_1__.Result.ERROR) {
5154
+ _utilities__WEBPACK_IMPORTED_MODULE_0__.logger.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);
5254
5155
  this._hasErrored = true; // Set flag
5255
5156
  // Throw the error to be caught by outer try...catch blocks
5256
5157
  throw result.error;
@@ -5272,7 +5173,7 @@ class WorkPipeline {
5272
5173
  }
5273
5174
  catch (error) {
5274
5175
  if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback
5275
- console.error(`Error thrown by processor at index ${idx} or its callback:`, error);
5176
+ _utilities__WEBPACK_IMPORTED_MODULE_0__.logger.error(`Error thrown by processor at index ${idx} or its callback:`, error);
5276
5177
  this._hasErrored = true;
5277
5178
  }
5278
5179
  // Rethrow to be caught by the trampoline's catch block
@@ -5307,7 +5208,7 @@ class WorkPipeline {
5307
5208
  catch (trampolineError) {
5308
5209
  // Catch errors propagated from step execution (processor or callback errors)
5309
5210
  if (!this._hasErrored) { // Avoid double logging
5310
- console.error("Error during trampoline step execution:", trampolineError);
5211
+ _utilities__WEBPACK_IMPORTED_MODULE_0__.logger.error("Error during trampoline step execution:", trampolineError);
5311
5212
  this._hasErrored = true;
5312
5213
  }
5313
5214
  currentStep = null; // Stop the loop
@@ -5325,7 +5226,7 @@ class WorkPipeline {
5325
5226
  trampoline(createStepRevised(0)); // Start with the revised step creator
5326
5227
  }
5327
5228
  catch (error) {
5328
- done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.error(error));
5229
+ done(_results__WEBPACK_IMPORTED_MODULE_1__.Result.error(error));
5329
5230
  }
5330
5231
  }
5331
5232
  pipe(work) {
@@ -5342,7 +5243,6 @@ class WorkPipeline {
5342
5243
  (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5343
5244
  __webpack_require__.r(__webpack_exports__);
5344
5245
  __webpack_require__.d(__webpack_exports__, {
5345
- AsyncPipeline: () => (/* reexport safe */ _TrampolinePipeline__WEBPACK_IMPORTED_MODULE_1__.AsyncPipeline),
5346
5246
  SyncronousQueue: () => (/* reexport safe */ _SyncronousQueue__WEBPACK_IMPORTED_MODULE_0__.SyncronousQueue),
5347
5247
  TrampolinePipeline: () => (/* reexport safe */ _TrampolinePipeline__WEBPACK_IMPORTED_MODULE_1__.TrampolinePipeline),
5348
5248
  WorkPipeline: () => (/* reexport safe */ _TrampolinePipeline__WEBPACK_IMPORTED_MODULE_1__.WorkPipeline)
@@ -5746,23 +5646,27 @@ __webpack_require__.d(__webpack_exports__, {
5746
5646
  OptimisticReplicationDbPlugin: () => (OptimisticReplicationDbPlugin)
5747
5647
  });
5748
5648
  /* ESM import */var _results__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../results */ "./src/results/Result.ts");
5749
- /* ESM import */var _pipeline__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../pipeline */ "./src/pipeline/TrampolinePipeline.ts");
5649
+ /* ESM import */var _pipeline__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../pipeline */ "./src/pipeline/TrampolinePipeline.ts");
5750
5650
  /* ESM import */var _query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../query */ "./src/plugins/query/Query.ts");
5751
5651
  /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utilities */ "./src/utilities/uuid.ts");
5752
- /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utilities */ "./src/utilities/replication.ts");
5652
+ /* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utilities */ "./src/utilities/replication.ts");
5753
5653
  /* ESM import */var _collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../collections */ "./src/collections/Changes.ts");
5654
+ /* ESM import */var _performance__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../performance */ "./src/performance/index.ts");
5754
5655
 
5755
5656
 
5756
5657
  7;
5757
5658
 
5758
5659
 
5759
5660
 
5661
+
5760
5662
  const getMemoryPluginCollectionSize = (plugin, schema) => {
5761
5663
  if ("getCollectionSize" in plugin && typeof plugin.getCollectionSize === "function") {
5762
5664
  return plugin.getCollectionSize(schema.collectionName);
5763
5665
  }
5764
5666
  throw new Error("Cannot get size of collection for MemoryPlugin, not an instance of MemoryPlugin");
5765
5667
  };
5668
+ const MAX_HYDRATION_WAIT_MS = 60_000; // 60 seconds max wait
5669
+ const HYDRATION_POLL_INTERVAL_MS = 10; // Check ever 10 ms
5766
5670
  let hydrationStatus = "hydration-not-started";
5767
5671
  class OptimisticReplicationDbPlugin {
5768
5672
  plugins;
@@ -5790,7 +5694,6 @@ class OptimisticReplicationDbPlugin {
5790
5694
  if (collectionSize === 0 && hydrationStatus === "hydration-not-started") {
5791
5695
  // Notify the cache that the db was hydrated right away
5792
5696
  hydrationStatus = "hydration-pending";
5793
- console.log('[ROUTIER] - Optimistic Query', hydrationStatus);
5794
5697
  // nothing is hydrated, let's try and hydrate before querying
5795
5698
  // Memory plugin might not be hydrated, lets hydrate it for the targeted schema only,
5796
5699
  // Other queries will do the same and hydrate if needed
@@ -5805,28 +5708,20 @@ class OptimisticReplicationDbPlugin {
5805
5708
  if (sourceResult.ok === _results__WEBPACK_IMPORTED_MODULE_2__.Result.ERROR) {
5806
5709
  // Notify that hydration failed
5807
5710
  hydrationStatus = "hydration-error";
5808
- console.log("[ROUTIER] - Hydration Error - Source Query", sourceResult);
5809
- done(sourceResult);
5810
- return;
5811
- }
5812
- if (sourceResult == null || (Array.isArray(sourceResult.data) && sourceResult.data.length === 0)) {
5813
- // Notify that hydration had no data
5814
- hydrationStatus = "hydration-error";
5815
- console.log("[ROUTIER] - Hydration Error - No Data", sourceResult);
5816
5711
  done(sourceResult);
5817
5712
  return;
5818
5713
  }
5819
- if (Array.isArray(sourceResult.data) === false) {
5714
+ // Source plugin can have no data, still should succeed
5715
+ if (Array.isArray(sourceResult.data.value) === false) {
5820
5716
  // Notify that hydration failed
5821
5717
  hydrationStatus = "hydration-error";
5822
- console.log("[ROUTIER] - Hydration Error - Bad Result", sourceResult);
5823
5718
  done(_results__WEBPACK_IMPORTED_MODULE_2__.PluginEventResult.error(event.id, "Query result is not an array"));
5824
5719
  return;
5825
5720
  }
5826
5721
  const changesCollection = new _collections__WEBPACK_IMPORTED_MODULE_3__.BulkPersistChanges();
5827
5722
  const schemaChanges = changesCollection.resolve(event.operation.schema.id);
5828
5723
  // Add the existing items into the persist payload as adds
5829
- schemaChanges.adds = sourceResult.data;
5724
+ schemaChanges.adds = sourceResult.data.value;
5830
5725
  readPlugin.bulkPersist({
5831
5726
  id: (0,_utilities__WEBPACK_IMPORTED_MODULE_0__.uuid)(8),
5832
5727
  schemas: event.schemas,
@@ -5836,7 +5731,6 @@ class OptimisticReplicationDbPlugin {
5836
5731
  if (readPersistResult.ok === _results__WEBPACK_IMPORTED_MODULE_2__.Result.ERROR) {
5837
5732
  // Notify that hydration failed
5838
5733
  hydrationStatus = "hydration-error";
5839
- console.log("[ROUTIER] - Hydration Error - Could Not Save", readPersistResult);
5840
5734
  done(readPersistResult);
5841
5735
  return;
5842
5736
  }
@@ -5847,6 +5741,41 @@ class OptimisticReplicationDbPlugin {
5847
5741
  });
5848
5742
  return;
5849
5743
  }
5744
+ if (hydrationStatus === "hydration-error") {
5745
+ done(_results__WEBPACK_IMPORTED_MODULE_2__.PluginEventResult.error(event.id, "Hydration failed, unable to query read plugin"));
5746
+ return;
5747
+ }
5748
+ // If hydration is pending, do not query empty collection, wait for hydration
5749
+ if (hydrationStatus === "hydration-pending") {
5750
+ const start = (0,_performance__WEBPACK_IMPORTED_MODULE_4__.now)();
5751
+ const pollHydrationStatus = () => {
5752
+ const delta = (0,_performance__WEBPACK_IMPORTED_MODULE_4__.now)() - start;
5753
+ if (delta > MAX_HYDRATION_WAIT_MS) {
5754
+ hydrationStatus = "hydration-error";
5755
+ done(_results__WEBPACK_IMPORTED_MODULE_2__.PluginEventResult.error(event.id, `Hydration timeout: exceeded maximum wait time of ${MAX_HYDRATION_WAIT_MS}ms`));
5756
+ return;
5757
+ }
5758
+ if (hydrationStatus === "hydration-error") {
5759
+ done(_results__WEBPACK_IMPORTED_MODULE_2__.PluginEventResult.error(event.id, "Hydration failed, unable to query read plugin"));
5760
+ return;
5761
+ }
5762
+ if (hydrationStatus === "hydration-success") {
5763
+ // Hydration completed successfully, proceed with query
5764
+ readPlugin.query(event, (readResult) => {
5765
+ if (readResult.ok === _results__WEBPACK_IMPORTED_MODULE_2__.Result.ERROR) {
5766
+ done(readResult);
5767
+ return;
5768
+ }
5769
+ done(readResult);
5770
+ });
5771
+ return;
5772
+ }
5773
+ // Still pending, check again after interval
5774
+ setTimeout(pollHydrationStatus, HYDRATION_POLL_INTERVAL_MS);
5775
+ };
5776
+ pollHydrationStatus();
5777
+ return;
5778
+ }
5850
5779
  // Collection is hydrated for the targeted collection and should be in sync
5851
5780
  readPlugin.query(event, (readResult) => {
5852
5781
  if (readResult.ok === _results__WEBPACK_IMPORTED_MODULE_2__.Result.ERROR) {
@@ -5863,7 +5792,7 @@ class OptimisticReplicationDbPlugin {
5863
5792
  }
5864
5793
  destroy(event, done) {
5865
5794
  try {
5866
- const workPipeline = new _pipeline__WEBPACK_IMPORTED_MODULE_4__.WorkPipeline();
5795
+ const workPipeline = new _pipeline__WEBPACK_IMPORTED_MODULE_5__.WorkPipeline();
5867
5796
  const plugins = [this.plugins.source, ...this.plugins.replicas];
5868
5797
  for (let i = 0, length = plugins.length; i < length; i++) {
5869
5798
  workPipeline.pipe((done) => plugins[i].destroy(event, done));
@@ -5882,7 +5811,7 @@ class OptimisticReplicationDbPlugin {
5882
5811
  }
5883
5812
  bulkPersist(event, done) {
5884
5813
  try {
5885
- const workPipeline = new _pipeline__WEBPACK_IMPORTED_MODULE_4__.WorkPipeline();
5814
+ const workPipeline = new _pipeline__WEBPACK_IMPORTED_MODULE_5__.WorkPipeline();
5886
5815
  const deferredPlugins = [this.plugins.source, ...this.plugins.replicas];
5887
5816
  // Since we are doing optimistic, we insert into the read plugin first and assume later plugins will succeed
5888
5817
  // This means the read plugin will generate ids for the source plugin
@@ -5902,7 +5831,7 @@ class OptimisticReplicationDbPlugin {
5902
5831
  const optimisticBulkPersistChanges = new _collections__WEBPACK_IMPORTED_MODULE_3__.BulkPersistChanges();
5903
5832
  // make sure we swap the adds here, that way we can make sure other persist events
5904
5833
  // don't take their additions and try to change subsequent calls
5905
- (0,_utilities__WEBPACK_IMPORTED_MODULE_5__.resolveBulkPersistChanges)(event, r.data, optimisticBulkPersistChanges);
5834
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_6__.resolveBulkPersistChanges)(event, r.data, optimisticBulkPersistChanges);
5906
5835
  for (let i = 0, length = deferredPlugins.length; i < length; i++) {
5907
5836
  workPipeline.pipe((d) => {
5908
5837
  const plugin = deferredPlugins[i];
@@ -5981,10 +5910,10 @@ class ReplicationDbPlugin {
5981
5910
  }
5982
5911
  destroy(event, done) {
5983
5912
  try {
5984
- const pipeline = new _pipeline__WEBPACK_IMPORTED_MODULE_1__.AsyncPipeline();
5913
+ const pipeline = new _pipeline__WEBPACK_IMPORTED_MODULE_1__.WorkPipeline();
5985
5914
  const plugins = [this.plugins.source, ...this.plugins.replicas];
5986
5915
  for (let i = 0, length = plugins.length; i < length; i++) {
5987
- pipeline.pipe(plugins[i], (plugin, done) => plugin.destroy(event, done));
5916
+ pipeline.pipe((done) => plugins[i].destroy(event, done));
5988
5917
  }
5989
5918
  pipeline.filter((result) => {
5990
5919
  if (result.ok === _results__WEBPACK_IMPORTED_MODULE_0__.Result.ERROR) {
@@ -8578,6 +8507,9 @@ class SchemaNumber extends _base_SchemaBase__WEBPACK_IMPORTED_MODULE_0__.SchemaB
8578
8507
  instance;
8579
8508
  type = _types__WEBPACK_IMPORTED_MODULE_1__.SchemaTypes.Number;
8580
8509
  _schemaNumber = true;
8510
+ constrain() {
8511
+ return new SchemaNumber(this);
8512
+ }
8581
8513
  from(propertyName) {
8582
8514
  return new _modifiers_SchemaFrom__WEBPACK_IMPORTED_MODULE_2__.SchemaFrom(propertyName, this);
8583
8515
  }
@@ -8717,6 +8649,9 @@ class SchemaString extends _base_SchemaBase__WEBPACK_IMPORTED_MODULE_0__.SchemaB
8717
8649
  from(propertyName) {
8718
8650
  return new _modifiers_SchemaFrom__WEBPACK_IMPORTED_MODULE_2__.SchemaFrom(propertyName, this);
8719
8651
  }
8652
+ constrain() {
8653
+ return new SchemaString(this);
8654
+ }
8720
8655
  optional() {
8721
8656
  return new _modifiers_SchemaOptional__WEBPACK_IMPORTED_MODULE_3__.SchemaOptional(this);
8722
8657
  }
@@ -8994,6 +8929,7 @@ __webpack_require__.d(__webpack_exports__, {
8994
8929
  hash: () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_1__.hash),
8995
8930
  isDate: () => (/* reexport safe */ _dates__WEBPACK_IMPORTED_MODULE_2__.isDate),
8996
8931
  isNodeRuntime: () => (/* reexport safe */ _runtime__WEBPACK_IMPORTED_MODULE_4__.isNodeRuntime),
8932
+ logger: () => (/* reexport safe */ _logger__WEBPACK_IMPORTED_MODULE_11__.logger),
8997
8933
  noop: () => (/* reexport safe */ _functions__WEBPACK_IMPORTED_MODULE_9__.noop),
8998
8934
  resolveBulkPersistChanges: () => (/* reexport safe */ _replication__WEBPACK_IMPORTED_MODULE_6__.resolveBulkPersistChanges),
8999
8935
  stringifyObject: () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_1__.stringifyObject),
@@ -9014,6 +8950,9 @@ __webpack_require__.d(__webpack_exports__, {
9014
8950
  /* ESM import */var _dbPluginEventUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dbPluginEventUtils */ "./src/utilities/dbPluginEventUtils.ts");
9015
8951
  /* ESM import */var _functions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./functions */ "./src/utilities/functions.ts");
9016
8952
  /* ESM import */var _unsafeCast__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./unsafeCast */ "./src/utilities/unsafeCast.ts");
8953
+ /* ESM import */var _logger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./logger */ "./src/utilities/logger.ts");
8954
+
8955
+
9017
8956
 
9018
8957
 
9019
8958
 
@@ -9027,6 +8966,50 @@ __webpack_require__.d(__webpack_exports__, {
9027
8966
 
9028
8967
 
9029
8968
 
8969
+ }),
8970
+ "./src/utilities/logger.ts":
8971
+ /*!*********************************!*\
8972
+ !*** ./src/utilities/logger.ts ***!
8973
+ \*********************************/
8974
+ (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8975
+ __webpack_require__.r(__webpack_exports__);
8976
+ __webpack_require__.d(__webpack_exports__, {
8977
+ logger: () => (logger)
8978
+ });
8979
+ const isDevelopment = () => {
8980
+ if (typeof process === 'undefined' || process.env == null) {
8981
+ return false;
8982
+ }
8983
+ const env = "development"?.toLowerCase();
8984
+ return env === 'dev' || env === 'development' || env === 'test';
8985
+ };
8986
+ const shouldLog = isDevelopment();
8987
+ const tryLog = (type, ...args) => {
8988
+ if (shouldLog) {
8989
+ console[type](...args);
8990
+ }
8991
+ };
8992
+ const logger = {
8993
+ log: (...args) => {
8994
+ tryLog("log", ...args);
8995
+ },
8996
+ info: (...args) => {
8997
+ tryLog("info", ...args);
8998
+ },
8999
+ warn: (...args) => {
9000
+ tryLog("warn", ...args);
9001
+ },
9002
+ error: (...args) => {
9003
+ tryLog("error", ...args);
9004
+ },
9005
+ debug: (...args) => {
9006
+ tryLog("debug", ...args);
9007
+ },
9008
+ table: (...args) => {
9009
+ tryLog("table", ...args);
9010
+ },
9011
+ };
9012
+
9030
9013
 
9031
9014
  }),
9032
9015
  "./src/utilities/objects.ts":
@@ -9423,7 +9406,6 @@ __webpack_require__.d(__webpack_exports__, {
9423
9406
  AndBuilder: () => (/* reexport safe */ _codegen__WEBPACK_IMPORTED_MODULE_1__.AndBuilder),
9424
9407
  ArrayBuilder: () => (/* reexport safe */ _codegen__WEBPACK_IMPORTED_MODULE_1__.ArrayBuilder),
9425
9408
  AssignmentBuilder: () => (/* reexport safe */ _codegen__WEBPACK_IMPORTED_MODULE_1__.AssignmentBuilder),
9426
- AsyncPipeline: () => (/* reexport safe */ _pipeline__WEBPACK_IMPORTED_MODULE_6__.AsyncPipeline),
9427
9409
  Block: () => (/* reexport safe */ _codegen__WEBPACK_IMPORTED_MODULE_1__.Block),
9428
9410
  BulkPersistChanges: () => (/* reexport safe */ _collections__WEBPACK_IMPORTED_MODULE_2__.BulkPersistChanges),
9429
9411
  BulkPersistResult: () => (/* reexport safe */ _collections__WEBPACK_IMPORTED_MODULE_2__.BulkPersistResult),
@@ -9512,6 +9494,7 @@ __webpack_require__.d(__webpack_exports__, {
9512
9494
  isDate: () => (/* reexport safe */ _utilities__WEBPACK_IMPORTED_MODULE_10__.isDate),
9513
9495
  isNodeRuntime: () => (/* reexport safe */ _utilities__WEBPACK_IMPORTED_MODULE_10__.isNodeRuntime),
9514
9496
  isPropertyExpression: () => (/* reexport safe */ _expressions__WEBPACK_IMPORTED_MODULE_4__.isPropertyExpression),
9497
+ logger: () => (/* reexport safe */ _utilities__WEBPACK_IMPORTED_MODULE_10__.logger),
9515
9498
  measure: () => (/* reexport safe */ _performance__WEBPACK_IMPORTED_MODULE_5__.measure),
9516
9499
  noop: () => (/* reexport safe */ _utilities__WEBPACK_IMPORTED_MODULE_10__.noop),
9517
9500
  now: () => (/* reexport safe */ _performance__WEBPACK_IMPORTED_MODULE_5__.now),
@@ -9557,7 +9540,6 @@ __webpack_require__.d(__webpack_exports__, {
9557
9540
  var __webpack_exports__AndBuilder = __webpack_exports__.AndBuilder;
9558
9541
  var __webpack_exports__ArrayBuilder = __webpack_exports__.ArrayBuilder;
9559
9542
  var __webpack_exports__AssignmentBuilder = __webpack_exports__.AssignmentBuilder;
9560
- var __webpack_exports__AsyncPipeline = __webpack_exports__.AsyncPipeline;
9561
9543
  var __webpack_exports__Block = __webpack_exports__.Block;
9562
9544
  var __webpack_exports__BulkPersistChanges = __webpack_exports__.BulkPersistChanges;
9563
9545
  var __webpack_exports__BulkPersistResult = __webpack_exports__.BulkPersistResult;
@@ -9646,6 +9628,7 @@ var __webpack_exports__hash = __webpack_exports__.hash;
9646
9628
  var __webpack_exports__isDate = __webpack_exports__.isDate;
9647
9629
  var __webpack_exports__isNodeRuntime = __webpack_exports__.isNodeRuntime;
9648
9630
  var __webpack_exports__isPropertyExpression = __webpack_exports__.isPropertyExpression;
9631
+ var __webpack_exports__logger = __webpack_exports__.logger;
9649
9632
  var __webpack_exports__measure = __webpack_exports__.measure;
9650
9633
  var __webpack_exports__noop = __webpack_exports__.noop;
9651
9634
  var __webpack_exports__now = __webpack_exports__.now;
@@ -9659,6 +9642,6 @@ var __webpack_exports__toPromise = __webpack_exports__.toPromise;
9659
9642
  var __webpack_exports__unsafeCast = __webpack_exports__.unsafeCast;
9660
9643
  var __webpack_exports__uuid = __webpack_exports__.uuid;
9661
9644
  var __webpack_exports__uuidv4 = __webpack_exports__.uuidv4;
9662
- export { __webpack_exports__AndBuilder as AndBuilder, __webpack_exports__ArrayBuilder as ArrayBuilder, __webpack_exports__AssignmentBuilder as AssignmentBuilder, __webpack_exports__AsyncPipeline as AsyncPipeline, __webpack_exports__Block as Block, __webpack_exports__BulkPersistChanges as BulkPersistChanges, __webpack_exports__BulkPersistResult as BulkPersistResult, __webpack_exports__Capability as Capability, __webpack_exports__CodeBuilder as CodeBuilder, __webpack_exports__ComparatorExpression as ComparatorExpression, __webpack_exports__ContainerBlock as ContainerBlock, __webpack_exports__DataTranslator as DataTranslator, __webpack_exports__EmptyExpression as EmptyExpression, __webpack_exports__EphemeralDataPlugin as EphemeralDataPlugin, __webpack_exports__Expression as Expression, __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__MemoryDataCollection as MemoryDataCollection, __webpack_exports__NotParsableExpression as NotParsableExpression, __webpack_exports__ObjectBuilder as ObjectBuilder, __webpack_exports__OperatorExpression as OperatorExpression, __webpack_exports__OptimisticReplicationDbPlugin as OptimisticReplicationDbPlugin, __webpack_exports__PerformanceCapability as PerformanceCapability, __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__ReplicationDbPlugin as ReplicationDbPlugin, __webpack_exports__Result as Result, __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__SchemaDeserialize as SchemaDeserialize, __webpack_exports__SchemaDistinct as SchemaDistinct, __webpack_exports__SchemaError as SchemaError, __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__SchemaSerialize as SchemaSerialize, __webpack_exports__SchemaString as SchemaString, __webpack_exports__SchemaTracked as SchemaTracked, __webpack_exports__SchemaTypes as SchemaTypes, __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__TracingCapability as TracingCapability, __webpack_exports__TrampolinePipeline as TrampolinePipeline, __webpack_exports__TranslatedArrayValue as TranslatedArrayValue, __webpack_exports__TranslatedGroupValue as TranslatedGroupValue, __webpack_exports__TranslatedSingleValue as TranslatedSingleValue, __webpack_exports__ValueExpression as ValueExpression, __webpack_exports__VariableBuilder as VariableBuilder, __webpack_exports__WorkPipeline as WorkPipeline, __webpack_exports__assertDate as assertDate, __webpack_exports__assertInstanceOf as assertInstanceOf, __webpack_exports__assertIsArray as assertIsArray, __webpack_exports__assertIsNotNull as assertIsNotNull, __webpack_exports__assertString as assertString, __webpack_exports__cast as cast, __webpack_exports__clone as clone, __webpack_exports__combineExpressions as combineExpressions, __webpack_exports__combineQueryOptionsCollections as combineQueryOptionsCollections, __webpack_exports__fastHash as fastHash, __webpack_exports__forEach as forEach, __webpack_exports__getProperties as getProperties, __webpack_exports__hash as hash, __webpack_exports__isDate as isDate, __webpack_exports__isNodeRuntime as isNodeRuntime, __webpack_exports__isPropertyExpression as isPropertyExpression, __webpack_exports__measure as measure, __webpack_exports__noop as noop, __webpack_exports__now as now, __webpack_exports__resolveBulkPersistChanges as resolveBulkPersistChanges, __webpack_exports__s as s, __webpack_exports__stringifyObject as stringifyObject, __webpack_exports__toEventArray as toEventArray, __webpack_exports__toExpression as toExpression, __webpack_exports__toMap as toMap, __webpack_exports__toPromise as toPromise, __webpack_exports__unsafeCast as unsafeCast, __webpack_exports__uuid as uuid, __webpack_exports__uuidv4 as uuidv4 };
9645
+ export { __webpack_exports__AndBuilder as AndBuilder, __webpack_exports__ArrayBuilder as ArrayBuilder, __webpack_exports__AssignmentBuilder as AssignmentBuilder, __webpack_exports__Block as Block, __webpack_exports__BulkPersistChanges as BulkPersistChanges, __webpack_exports__BulkPersistResult as BulkPersistResult, __webpack_exports__Capability as Capability, __webpack_exports__CodeBuilder as CodeBuilder, __webpack_exports__ComparatorExpression as ComparatorExpression, __webpack_exports__ContainerBlock as ContainerBlock, __webpack_exports__DataTranslator as DataTranslator, __webpack_exports__EmptyExpression as EmptyExpression, __webpack_exports__EphemeralDataPlugin as EphemeralDataPlugin, __webpack_exports__Expression as Expression, __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__MemoryDataCollection as MemoryDataCollection, __webpack_exports__NotParsableExpression as NotParsableExpression, __webpack_exports__ObjectBuilder as ObjectBuilder, __webpack_exports__OperatorExpression as OperatorExpression, __webpack_exports__OptimisticReplicationDbPlugin as OptimisticReplicationDbPlugin, __webpack_exports__PerformanceCapability as PerformanceCapability, __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__ReplicationDbPlugin as ReplicationDbPlugin, __webpack_exports__Result as Result, __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__SchemaDeserialize as SchemaDeserialize, __webpack_exports__SchemaDistinct as SchemaDistinct, __webpack_exports__SchemaError as SchemaError, __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__SchemaSerialize as SchemaSerialize, __webpack_exports__SchemaString as SchemaString, __webpack_exports__SchemaTracked as SchemaTracked, __webpack_exports__SchemaTypes as SchemaTypes, __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__TracingCapability as TracingCapability, __webpack_exports__TrampolinePipeline as TrampolinePipeline, __webpack_exports__TranslatedArrayValue as TranslatedArrayValue, __webpack_exports__TranslatedGroupValue as TranslatedGroupValue, __webpack_exports__TranslatedSingleValue as TranslatedSingleValue, __webpack_exports__ValueExpression as ValueExpression, __webpack_exports__VariableBuilder as VariableBuilder, __webpack_exports__WorkPipeline as WorkPipeline, __webpack_exports__assertDate as assertDate, __webpack_exports__assertInstanceOf as assertInstanceOf, __webpack_exports__assertIsArray as assertIsArray, __webpack_exports__assertIsNotNull as assertIsNotNull, __webpack_exports__assertString as assertString, __webpack_exports__cast as cast, __webpack_exports__clone as clone, __webpack_exports__combineExpressions as combineExpressions, __webpack_exports__combineQueryOptionsCollections as combineQueryOptionsCollections, __webpack_exports__fastHash as fastHash, __webpack_exports__forEach as forEach, __webpack_exports__getProperties as getProperties, __webpack_exports__hash as hash, __webpack_exports__isDate as isDate, __webpack_exports__isNodeRuntime as isNodeRuntime, __webpack_exports__isPropertyExpression as isPropertyExpression, __webpack_exports__logger as logger, __webpack_exports__measure as measure, __webpack_exports__noop as noop, __webpack_exports__now as now, __webpack_exports__resolveBulkPersistChanges as resolveBulkPersistChanges, __webpack_exports__s as s, __webpack_exports__stringifyObject as stringifyObject, __webpack_exports__toEventArray as toEventArray, __webpack_exports__toExpression as toExpression, __webpack_exports__toMap as toMap, __webpack_exports__toPromise as toPromise, __webpack_exports__unsafeCast as unsafeCast, __webpack_exports__uuid as uuid, __webpack_exports__uuidv4 as uuidv4 };
9663
9646
 
9664
9647
  //# sourceMappingURL=index.js.map