@routier/core 0.1.0-rc.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/assertions/index.js +4 -15
  2. package/dist/assertions/index.js.map +1 -1
  3. package/dist/capabilities/index.js +99 -89
  4. package/dist/capabilities/index.js.map +1 -1
  5. package/dist/codegen/index.js +21 -36
  6. package/dist/codegen/index.js.map +1 -1
  7. package/dist/collections/index.js +49 -92
  8. package/dist/collections/index.js.map +1 -1
  9. package/dist/errors/index.js +4 -15
  10. package/dist/errors/index.js.map +1 -1
  11. package/dist/expressions/index.js +102 -86
  12. package/dist/expressions/index.js.map +1 -1
  13. package/dist/index.js +1737 -2418
  14. package/dist/index.js.map +1 -1
  15. package/dist/performance/index.js +73 -9
  16. package/dist/performance/index.js.map +1 -1
  17. package/dist/pipeline/TrampolinePipeline.d.ts +0 -8
  18. package/dist/pipeline/index.js +71 -174
  19. package/dist/pipeline/index.js.map +1 -1
  20. package/dist/plugins/index.js +302 -479
  21. package/dist/plugins/index.js.map +1 -1
  22. package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +6 -5
  23. package/dist/plugins/replication/ReplicationDbPlugin.d.ts +5 -5
  24. package/dist/plugins/replication/types.d.ts +1 -0
  25. package/dist/plugins/types.d.ts +1 -1
  26. package/dist/results/index.js +11 -26
  27. package/dist/results/index.js.map +1 -1
  28. package/dist/schema/SchemaDefinition.d.ts +7 -6
  29. package/dist/schema/index.js +1119 -1483
  30. package/dist/schema/index.js.map +1 -1
  31. package/dist/schema/property/types/SchemaNumber.d.ts +1 -0
  32. package/dist/schema/property/types/SchemaString.d.ts +1 -0
  33. package/dist/schema/testSchemas.test.d.ts +37 -16
  34. package/dist/schema/types.d.ts +5 -3
  35. package/dist/types/index.js +0 -6
  36. package/dist/types/index.js.map +1 -1
  37. package/dist/utilities/index.d.ts +1 -0
  38. package/dist/utilities/index.js +103 -117
  39. package/dist/utilities/index.js.map +1 -1
  40. package/dist/utilities/logger.d.ts +8 -0
  41. package/dist/utilities/types.d.ts +17 -2
  42. package/package.json +3 -2
  43. package/readme.md +1 -1
@@ -16,6 +16,7 @@ export declare class SchemaNumber<T extends number, TModifiers extends SchemaMod
16
16
  instance: T;
17
17
  type: SchemaTypes;
18
18
  private _schemaNumber;
19
+ constrain<K extends T>(): SchemaNumber<K, TModifiers>;
19
20
  from(propertyName: string): SchemaFrom<T, TModifiers>;
20
21
  optional(): SchemaOptional<T, "optional" | TModifiers>;
21
22
  nullable(): SchemaNullable<T, "nullable" | TModifiers>;
@@ -17,6 +17,7 @@ export declare class SchemaString<T extends string, TModifiers extends SchemaMod
17
17
  type: SchemaTypes;
18
18
  private _schemaString;
19
19
  from(propertyName: string): SchemaFrom<T, TModifiers>;
20
+ constrain<K extends T>(): SchemaString<K, TModifiers>;
20
21
  optional(): SchemaOptional<T, "optional" | TModifiers>;
21
22
  nullable(): SchemaNullable<T, "nullable" | TModifiers>;
22
23
  key(): SchemaKey<T, "key" | TModifiers>;
@@ -1,3 +1,7 @@
1
+ declare const __brand: unique symbol;
2
+ export type UUID = string & {
3
+ readonly [__brand]: 'UUID';
4
+ };
1
5
  export declare const optionalObjectSchemaFactory: () => import("./types").CompiledSchema<{
2
6
  id: import(".").SchemaKey<string, "key">;
3
7
  user: import(".").SchemaOptional<{
@@ -8,9 +12,9 @@ export declare const optionalObjectSchemaFactory: () => import("./types").Compil
8
12
  createdAt: import(".").SchemaDeserialize<Date, "default" | "deserialize">;
9
13
  }>;
10
14
  export declare const usersSchemaOneFactory: () => import("./types").CompiledSchema<{
11
- documentType: import(".").SchemaTracked<string, "computed">;
15
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
12
16
  } & {
13
- id: import(".").SchemaDefault<string, {
17
+ id: import(".").SchemaDefault<UUID, {
14
18
  uuid: () => string;
15
19
  }, "key" | "default">;
16
20
  firstName: import(".").SchemaString<string, never>;
@@ -25,14 +29,14 @@ export declare const usersSchemaOneFactory: () => import("./types").CompiledSche
25
29
  }, never>;
26
30
  }>;
27
31
  export declare const usersSchemaTwoFactory: () => import("./types").CompiledSchema<{
28
- documentType: import(".").SchemaTracked<string, "computed">;
32
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
29
33
  } & {
30
34
  id: import(".").SchemaDefault<string, {
31
35
  uuid: () => string;
32
36
  }, "key" | "default">;
33
37
  firstName: import(".").SchemaString<string, never>;
34
38
  lastName: import(".").SchemaString<string, never>;
35
- age: import(".").SchemaNumber<number, never>;
39
+ age: import(".").SchemaNumber<1, never>;
36
40
  createdDate: import(".").SchemaDefault<Date, never, "default">;
37
41
  address: import(".").SchemaObject<{
38
42
  street: import(".").SchemaString<string, never>;
@@ -46,7 +50,7 @@ export declare const usersSchemaTwoFactory: () => import("./types").CompiledSche
46
50
  }, never>;
47
51
  }>;
48
52
  export declare const oneComputedPropertySchemaFactory: () => import("./types").CompiledSchema<{
49
- documentType: import(".").SchemaTracked<string, "computed">;
53
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
50
54
  } & {
51
55
  id: import(".").SchemaIdentity<string, "key" | "identity">;
52
56
  title: import(".").SchemaString<string, never>;
@@ -93,7 +97,7 @@ export declare const remap: () => import("./types").CompiledSchema<{
93
97
  isOnline: import(".").SchemaBoolean<boolean, never>;
94
98
  }>;
95
99
  export declare const computedId: () => import("./types").CompiledSchema<{
96
- id: import(".").SchemaKey<string, "key" | "computed">;
100
+ id: import(".").SchemaKey<import("./types").CollectionName, "key" | "computed">;
97
101
  } & {
98
102
  name: import(".").SchemaDefault<string, {
99
103
  name: string;
@@ -118,7 +122,7 @@ export declare const computedAndFunctionPropertiesSchemaFactory: () => import(".
118
122
  discontinued: import(".").SchemaBoolean<boolean, never>;
119
123
  }>;
120
124
  export declare const deeplyNestedSchemaFactory: () => import("./types").CompiledSchema<{
121
- documentType: import(".").SchemaTracked<string, "computed">;
125
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
122
126
  } & {
123
127
  id: import(".").SchemaDefault<string, {
124
128
  uuid: () => string;
@@ -139,7 +143,7 @@ export declare const deeplyNestedSchemaFactory: () => import("./types").Compiled
139
143
  }, never>;
140
144
  }>;
141
145
  export declare const complexOneSchemaFactory: () => import("./types").CompiledSchema<{
142
- documentType: import(".").SchemaTracked<string, "computed">;
146
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
143
147
  } & {
144
148
  id: import(".").SchemaDefault<string, {
145
149
  uuid: () => string;
@@ -156,14 +160,14 @@ export declare const complexOneSchemaFactory: () => import("./types").CompiledSc
156
160
  }, never>;
157
161
  }>;
158
162
  export declare const complexTwoSchemaFactory: () => import("./types").CompiledSchema<{
159
- documentType: import(".").SchemaTracked<string, "computed">;
163
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
160
164
  } & {
161
165
  fullName: import("./table").SchemaComputed<string, never, "unmapped" | "computed">;
162
166
  age: import("./table").SchemaComputed<number, never, "unmapped" | "computed">;
163
167
  formattedAddress: import("./table").SchemaComputed<string, never, "unmapped" | "computed">;
164
168
  isActive: import("./table").SchemaComputed<boolean, never, "unmapped" | "computed">;
165
169
  getDisplayName: import("./table").SchemaFunction<(format: "short" | "full") => string, never, "unmapped">;
166
- documentType: import(".").SchemaTracked<string, "computed">;
170
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
167
171
  } & {
168
172
  _id: import(".").SchemaIdentity<string, "key" | "identity">;
169
173
  _rev: import(".").SchemaIdentity<string, "identity" | "readonly">;
@@ -187,9 +191,9 @@ export declare const complexTwoSchemaFactory: () => import("./types").CompiledSc
187
191
  createdAt: import(".").SchemaDefault<Date, never, "default">;
188
192
  }>;
189
193
  export declare const factories: ((() => import("./types").CompiledSchema<{
190
- documentType: import(".").SchemaTracked<string, "computed">;
194
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
191
195
  } & {
192
- id: import(".").SchemaDefault<string, {
196
+ id: import(".").SchemaDefault<UUID, {
193
197
  uuid: () => string;
194
198
  }, "key" | "default">;
195
199
  firstName: import(".").SchemaString<string, never>;
@@ -203,7 +207,7 @@ export declare const factories: ((() => import("./types").CompiledSchema<{
203
207
  zip: import(".").SchemaString<string, never>;
204
208
  }, never>;
205
209
  }>) | (() => import("./types").CompiledSchema<{
206
- documentType: import(".").SchemaTracked<string, "computed">;
210
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
207
211
  } & {
208
212
  id: import(".").SchemaIdentity<string, "key" | "identity">;
209
213
  title: import(".").SchemaString<string, never>;
@@ -241,7 +245,7 @@ export declare const factories: ((() => import("./types").CompiledSchema<{
241
245
  restockDate: import(".").SchemaOptional<Date, "optional">;
242
246
  discontinued: import(".").SchemaBoolean<boolean, never>;
243
247
  }>) | (() => import("./types").CompiledSchema<{
244
- documentType: import(".").SchemaTracked<string, "computed">;
248
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
245
249
  } & {
246
250
  id: import(".").SchemaDefault<string, {
247
251
  uuid: () => string;
@@ -261,14 +265,30 @@ export declare const factories: ((() => import("./types").CompiledSchema<{
261
265
  zip: import(".").SchemaString<string, never>;
262
266
  }, never>;
263
267
  }>) | (() => import("./types").CompiledSchema<{
264
- documentType: import(".").SchemaTracked<string, "computed">;
268
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
269
+ } & {
270
+ id: import(".").SchemaDefault<string, {
271
+ uuid: () => string;
272
+ }, "key" | "default">;
273
+ firstName: import(".").SchemaString<string, never>;
274
+ lastName: import(".").SchemaString<string, never>;
275
+ age: import(".").SchemaNumber<number, never>;
276
+ createdDate: import(".").SchemaDefault<Date, never, "default">;
277
+ address: import(".").SchemaObject<{
278
+ street: import(".").SchemaString<string, never>;
279
+ city: import(".").SchemaString<string, never>;
280
+ state: import(".").SchemaString<string, never>;
281
+ zip: import(".").SchemaString<string, never>;
282
+ }, never>;
283
+ }>) | (() => import("./types").CompiledSchema<{
284
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
265
285
  } & {
266
286
  fullName: import("./table").SchemaComputed<string, never, "unmapped" | "computed">;
267
287
  age: import("./table").SchemaComputed<number, never, "unmapped" | "computed">;
268
288
  formattedAddress: import("./table").SchemaComputed<string, never, "unmapped" | "computed">;
269
289
  isActive: import("./table").SchemaComputed<boolean, never, "unmapped" | "computed">;
270
290
  getDisplayName: import("./table").SchemaFunction<(format: "short" | "full") => string, never, "unmapped">;
271
- documentType: import(".").SchemaTracked<string, "computed">;
291
+ documentType: import(".").SchemaTracked<import("./types").CollectionName, "computed">;
272
292
  } & {
273
293
  _id: import(".").SchemaIdentity<string, "key" | "identity">;
274
294
  _rev: import(".").SchemaIdentity<string, "identity" | "readonly">;
@@ -291,3 +311,4 @@ export declare const factories: ((() => import("./types").CompiledSchema<{
291
311
  lastLoginAt: import(".").SchemaOptional<Date, "optional">;
292
312
  createdAt: import(".").SchemaDefault<Date, never, "default">;
293
313
  }>))[];
314
+ export {};
@@ -6,8 +6,9 @@ import { PropertyInfo } from "./PropertyInfo";
6
6
  import { DeepPartial } from "../types";
7
7
  import { SchemaFunction } from "./table";
8
8
  import { SchemaOptional } from "./property/modifiers";
9
+ import { Branded } from "../utilities/types";
9
10
  export type DefaultValue<T, I = never> = T | ((injected: I) => T);
10
- export type FunctionBody<TEntity, TResult> = (entity: TEntity, collectionName: string) => TResult;
11
+ export type FunctionBody<TEntity, TResult> = (entity: TEntity, collectionName: CollectionName) => TResult;
11
12
  export type IdType = string | number;
12
13
  export declare enum SchemaTypes {
13
14
  Array = "Array",
@@ -138,7 +139,7 @@ export type CompiledSchema<TEntity extends {}> = {
138
139
  /** Unique id for the schema. */
139
140
  id: SchemaId;
140
141
  /** The name of the collection for this schema. */
141
- collectionName: string;
142
+ collectionName: CollectionName;
142
143
  /** Returns all IDs for the given entity (usually a single-element tuple). */
143
144
  getIds: (entity: InferType<TEntity>) => [IdType];
144
145
  /** Enriches the entity with change tracking or other metadata. */
@@ -158,7 +159,8 @@ export type CompiledSchema<TEntity extends {}> = {
158
159
  };
159
160
  export type PropertySerializer<T extends any> = (value: T) => string | number;
160
161
  export type PropertyDeserializer<T extends any> = (value: string | number) => T;
161
- export type SchemaId = number;
162
+ export type SchemaId = Branded<number, "SchemaId">;
163
+ export type CollectionName = Branded<string, "CollectionName">;
162
164
  export type SchemaModifiers = "default" | "deserialize" | "identity" | "key" | "nullable" | "optional" | "readonly" | "serialize" | "unmapped" | "computed" | "distinct";
163
165
  type InferPrimitive<T> = T extends SchemaOptional<infer C, infer __> ? C extends (string | number | Date) ? C : {
164
166
  [K in keyof C]: InferPrimitive<C[K]>;
@@ -1,7 +1,6 @@
1
1
  // The require scope
2
2
  var __webpack_require__ = {};
3
3
 
4
- /************************************************************************/
5
4
  // webpack/runtime/make_namespace_object
6
5
  (() => {
7
6
  // define __esModule on exports
@@ -12,12 +11,7 @@ __webpack_require__.r = (exports) => {
12
11
  Object.defineProperty(exports, '__esModule', { value: true });
13
12
  };
14
13
  })();
15
- /************************************************************************/
16
14
  var __webpack_exports__ = {};
17
-
18
- /*!****************************!*\
19
- !*** ./src/types/index.ts ***!
20
- \****************************/
21
15
  __webpack_require__.r(__webpack_exports__);
22
16
 
23
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"types/index.js","sources":["webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/types/index.ts"],"sourcesContent":["// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export type DeepPartial<T> = T extends object ? {\n [P in keyof T]?: DeepPartial<T[P]>;\n} : T;\n\nexport type GenericFunction<T, R> = (value: T) => R;"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA,uDAAuD,iBAAiB;AACxE;AACA,gDAAgD,aAAa;AAC7D"}
1
+ {"version":3,"file":"types/index.js","sources":["webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/types/index.ts"],"sourcesContent":["// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export type DeepPartial<T> = T extends object ? {\n [P in keyof T]?: DeepPartial<T[P]>;\n} : T;\n\nexport type GenericFunction<T, R> = (value: T) => R;"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA,uDAAuD,iBAAiB;AACxE;AACA,gDAAgD,aAAa;AAC7D,E"}
@@ -10,3 +10,4 @@ export * from './queryOptionsCollection';
10
10
  export * from './dbPluginEventUtils';
11
11
  export * from './functions';
12
12
  export * from './unsafeCast';
13
+ export * from './logger';
@@ -1,9 +1,5 @@
1
1
  var __webpack_modules__ = ({
2
- "./src/expressions/utils.ts":
3
- /*!**********************************!*\
4
- !*** ./src/expressions/utils.ts ***!
5
- \**********************************/
6
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2
+ "./src/expressions/utils.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
3
  __webpack_require__.r(__webpack_exports__);
8
4
  __webpack_require__.d(__webpack_exports__, {
9
5
  forEach: () => (forEach),
@@ -60,17 +56,13 @@ function forEach(expression, callback) {
60
56
  }
61
57
 
62
58
 
63
- }),
64
- "./src/plugins/query/QueryOptionsCollection.ts":
65
- /*!*****************************************************!*\
66
- !*** ./src/plugins/query/QueryOptionsCollection.ts ***!
67
- \*****************************************************/
68
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
59
+ },
60
+ "./src/plugins/query/QueryOptionsCollection.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
69
61
  __webpack_require__.r(__webpack_exports__);
70
62
  __webpack_require__.d(__webpack_exports__, {
71
63
  QueryOptionsCollection: () => (QueryOptionsCollection)
72
64
  });
73
- /* ESM import */var _expressions_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../expressions/utils */ "./src/expressions/utils.ts");
65
+ /* import */ var _expressions_utils__rspack_import_0 = __webpack_require__("./src/expressions/utils.ts");
74
66
 
75
67
  class QueryOptionsCollection {
76
68
  options = new Map();
@@ -107,8 +99,8 @@ class QueryOptionsCollection {
107
99
  this.nextExecutionTarget = "memory";
108
100
  }
109
101
  else {
110
- (0,_expressions_utils__WEBPACK_IMPORTED_MODULE_0__.forEach)(filterValue.expression, (expression) => {
111
- if ((0,_expressions_utils__WEBPACK_IMPORTED_MODULE_0__.isPropertyExpression)(expression) && expression.property.isUnmapped) {
102
+ (0,_expressions_utils__rspack_import_0.forEach)(filterValue.expression, (expression) => {
103
+ if ((0,_expressions_utils__rspack_import_0.isPropertyExpression)(expression) && expression.property.isUnmapped) {
112
104
  // Cut over to memory execution, unmapped properties are not in the database and
113
105
  // cannot be queried
114
106
  this.nextExecutionTarget = "memory";
@@ -188,12 +180,8 @@ class QueryOptionsCollection {
188
180
  }
189
181
 
190
182
 
191
- }),
192
- "./src/utilities/arrays.ts":
193
- /*!*********************************!*\
194
- !*** ./src/utilities/arrays.ts ***!
195
- \*********************************/
196
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
183
+ },
184
+ "./src/utilities/arrays.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
197
185
  __webpack_require__.r(__webpack_exports__);
198
186
  __webpack_require__.d(__webpack_exports__, {
199
187
  toMap: () => (toMap)
@@ -209,12 +197,8 @@ const toMap = (data, keySelector) => {
209
197
  };
210
198
 
211
199
 
212
- }),
213
- "./src/utilities/dates.ts":
214
- /*!********************************!*\
215
- !*** ./src/utilities/dates.ts ***!
216
- \********************************/
217
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
200
+ },
201
+ "./src/utilities/dates.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
218
202
  __webpack_require__.r(__webpack_exports__);
219
203
  __webpack_require__.d(__webpack_exports__, {
220
204
  isDate: () => (isDate)
@@ -230,12 +214,8 @@ const isDate = (data) => {
230
214
  };
231
215
 
232
216
 
233
- }),
234
- "./src/utilities/dbPluginEventUtils.ts":
235
- /*!*********************************************!*\
236
- !*** ./src/utilities/dbPluginEventUtils.ts ***!
237
- \*********************************************/
238
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
217
+ },
218
+ "./src/utilities/dbPluginEventUtils.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
239
219
  __webpack_require__.r(__webpack_exports__);
240
220
  __webpack_require__.d(__webpack_exports__, {
241
221
  toEventArray: () => (toEventArray)
@@ -266,12 +246,8 @@ const toEventArray = (event) => {
266
246
  };
267
247
 
268
248
 
269
- }),
270
- "./src/utilities/functions.ts":
271
- /*!************************************!*\
272
- !*** ./src/utilities/functions.ts ***!
273
- \************************************/
274
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
249
+ },
250
+ "./src/utilities/functions.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
275
251
  __webpack_require__.r(__webpack_exports__);
276
252
  __webpack_require__.d(__webpack_exports__, {
277
253
  noop: () => (noop)
@@ -279,12 +255,49 @@ __webpack_require__.d(__webpack_exports__, {
279
255
  const noop = (...args) => { };
280
256
 
281
257
 
282
- }),
283
- "./src/utilities/objects.ts":
284
- /*!**********************************!*\
285
- !*** ./src/utilities/objects.ts ***!
286
- \**********************************/
287
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
258
+ },
259
+ "./src/utilities/logger.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
260
+ __webpack_require__.r(__webpack_exports__);
261
+ __webpack_require__.d(__webpack_exports__, {
262
+ logger: () => (logger)
263
+ });
264
+ const isDevelopment = () => {
265
+ if (typeof process === 'undefined' || process.env == null) {
266
+ return false;
267
+ }
268
+ const env = "development"?.toLowerCase();
269
+ return env === 'dev' || env === 'development' || env === 'test';
270
+ };
271
+ const shouldLog = isDevelopment();
272
+ const tryLog = (type, ...args) => {
273
+ if (shouldLog) {
274
+ console[type](...args);
275
+ }
276
+ };
277
+ const logger = {
278
+ log: (...args) => {
279
+ tryLog("log", ...args);
280
+ },
281
+ info: (...args) => {
282
+ tryLog("info", ...args);
283
+ },
284
+ warn: (...args) => {
285
+ tryLog("warn", ...args);
286
+ },
287
+ error: (...args) => {
288
+ tryLog("error", ...args);
289
+ },
290
+ debug: (...args) => {
291
+ tryLog("debug", ...args);
292
+ },
293
+ table: (...args) => {
294
+ tryLog("table", ...args);
295
+ },
296
+ };
297
+
298
+
299
+ },
300
+ "./src/utilities/objects.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
288
301
  __webpack_require__.r(__webpack_exports__);
289
302
  __webpack_require__.d(__webpack_exports__, {
290
303
  cast: () => (cast),
@@ -298,20 +311,16 @@ function clone(data) {
298
311
  }
299
312
 
300
313
 
301
- }),
302
- "./src/utilities/queryOptionsCollection.ts":
303
- /*!*************************************************!*\
304
- !*** ./src/utilities/queryOptionsCollection.ts ***!
305
- \*************************************************/
306
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
314
+ },
315
+ "./src/utilities/queryOptionsCollection.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
307
316
  __webpack_require__.r(__webpack_exports__);
308
317
  __webpack_require__.d(__webpack_exports__, {
309
318
  combineQueryOptionsCollections: () => (combineQueryOptionsCollections)
310
319
  });
311
- /* ESM import */var _plugins_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../plugins/query */ "./src/plugins/query/QueryOptionsCollection.ts");
320
+ /* import */ var _plugins_query__rspack_import_0 = __webpack_require__("./src/plugins/query/QueryOptionsCollection.ts");
312
321
 
313
322
  const combineQueryOptionsCollections = (...collections) => {
314
- const result = new _plugins_query__WEBPACK_IMPORTED_MODULE_0__.QueryOptionsCollection();
323
+ const result = new _plugins_query__rspack_import_0.QueryOptionsCollection();
315
324
  for (let i = 0, length = collections.length; i < length; i++) {
316
325
  const collection = collections[i];
317
326
  // Add scoped items first
@@ -323,12 +332,8 @@ const combineQueryOptionsCollections = (...collections) => {
323
332
  };
324
333
 
325
334
 
326
- }),
327
- "./src/utilities/replication.ts":
328
- /*!**************************************!*\
329
- !*** ./src/utilities/replication.ts ***!
330
- \**************************************/
331
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
335
+ },
336
+ "./src/utilities/replication.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
332
337
  __webpack_require__.r(__webpack_exports__);
333
338
  __webpack_require__.d(__webpack_exports__, {
334
339
  resolveBulkPersistChanges: () => (resolveBulkPersistChanges)
@@ -351,12 +356,8 @@ const resolveBulkPersistChanges = (event, result, bulkPersistChanges) => {
351
356
  };
352
357
 
353
358
 
354
- }),
355
- "./src/utilities/runtime.ts":
356
- /*!**********************************!*\
357
- !*** ./src/utilities/runtime.ts ***!
358
- \**********************************/
359
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
359
+ },
360
+ "./src/utilities/runtime.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
360
361
  __webpack_require__.r(__webpack_exports__);
361
362
  __webpack_require__.d(__webpack_exports__, {
362
363
  isNodeRuntime: () => (isNodeRuntime)
@@ -366,12 +367,8 @@ const isNodeRuntime = () => typeof process !== 'undefined' &&
366
367
  process.versions.node != null;
367
368
 
368
369
 
369
- }),
370
- "./src/utilities/strings.ts":
371
- /*!**********************************!*\
372
- !*** ./src/utilities/strings.ts ***!
373
- \**********************************/
374
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
370
+ },
371
+ "./src/utilities/strings.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
375
372
  __webpack_require__.r(__webpack_exports__);
376
373
  __webpack_require__.d(__webpack_exports__, {
377
374
  fastHash: () => (fastHash),
@@ -532,12 +529,8 @@ function stringifyPlainObject(obj, maxDepth, currentDepth) {
532
529
  }
533
530
 
534
531
 
535
- }),
536
- "./src/utilities/unsafeCast.ts":
537
- /*!*************************************!*\
538
- !*** ./src/utilities/unsafeCast.ts ***!
539
- \*************************************/
540
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
532
+ },
533
+ "./src/utilities/unsafeCast.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
541
534
  __webpack_require__.r(__webpack_exports__);
542
535
  __webpack_require__.d(__webpack_exports__, {
543
536
  unsafeCast: () => (unsafeCast)
@@ -547,12 +540,8 @@ const unsafeCast = (value) => {
547
540
  };
548
541
 
549
542
 
550
- }),
551
- "./src/utilities/uuid.ts":
552
- /*!*******************************!*\
553
- !*** ./src/utilities/uuid.ts ***!
554
- \*******************************/
555
- (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
543
+ },
544
+ "./src/utilities/uuid.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
556
545
  __webpack_require__.r(__webpack_exports__);
557
546
  __webpack_require__.d(__webpack_exports__, {
558
547
  uuid: () => (uuid),
@@ -609,10 +598,9 @@ const uuidv4 = () => {
609
598
  };
610
599
 
611
600
 
612
- }),
601
+ },
613
602
 
614
603
  });
615
- /************************************************************************/
616
604
  // The module cache
617
605
  var __webpack_module_cache__ = {};
618
606
 
@@ -636,7 +624,6 @@ return module.exports;
636
624
 
637
625
  }
638
626
 
639
- /************************************************************************/
640
627
  // webpack/runtime/define_property_getters
641
628
  (() => {
642
629
  __webpack_require__.d = (exports, definition) => {
@@ -661,43 +648,41 @@ __webpack_require__.r = (exports) => {
661
648
  Object.defineProperty(exports, '__esModule', { value: true });
662
649
  };
663
650
  })();
664
- /************************************************************************/
665
651
  var __webpack_exports__ = {};
666
652
  // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
667
653
  (() => {
668
-
669
- /*!********************************!*\
670
- !*** ./src/utilities/index.ts ***!
671
- \********************************/
672
654
  __webpack_require__.r(__webpack_exports__);
673
655
  __webpack_require__.d(__webpack_exports__, {
674
- cast: () => (/* reexport safe */ _objects__WEBPACK_IMPORTED_MODULE_3__.cast),
675
- clone: () => (/* reexport safe */ _objects__WEBPACK_IMPORTED_MODULE_3__.clone),
676
- combineQueryOptionsCollections: () => (/* reexport safe */ _queryOptionsCollection__WEBPACK_IMPORTED_MODULE_7__.combineQueryOptionsCollections),
677
- fastHash: () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_1__.fastHash),
678
- hash: () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_1__.hash),
679
- isDate: () => (/* reexport safe */ _dates__WEBPACK_IMPORTED_MODULE_2__.isDate),
680
- isNodeRuntime: () => (/* reexport safe */ _runtime__WEBPACK_IMPORTED_MODULE_4__.isNodeRuntime),
681
- noop: () => (/* reexport safe */ _functions__WEBPACK_IMPORTED_MODULE_9__.noop),
682
- resolveBulkPersistChanges: () => (/* reexport safe */ _replication__WEBPACK_IMPORTED_MODULE_6__.resolveBulkPersistChanges),
683
- stringifyObject: () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_1__.stringifyObject),
684
- toEventArray: () => (/* reexport safe */ _dbPluginEventUtils__WEBPACK_IMPORTED_MODULE_8__.toEventArray),
685
- toMap: () => (/* reexport safe */ _arrays__WEBPACK_IMPORTED_MODULE_0__.toMap),
686
- unsafeCast: () => (/* reexport safe */ _unsafeCast__WEBPACK_IMPORTED_MODULE_10__.unsafeCast),
687
- uuid: () => (/* reexport safe */ _uuid__WEBPACK_IMPORTED_MODULE_5__.uuid),
688
- uuidv4: () => (/* reexport safe */ _uuid__WEBPACK_IMPORTED_MODULE_5__.uuidv4)
656
+ cast: () => (/* reexport safe */ _objects__rspack_import_3.cast),
657
+ clone: () => (/* reexport safe */ _objects__rspack_import_3.clone),
658
+ combineQueryOptionsCollections: () => (/* reexport safe */ _queryOptionsCollection__rspack_import_7.combineQueryOptionsCollections),
659
+ fastHash: () => (/* reexport safe */ _strings__rspack_import_1.fastHash),
660
+ hash: () => (/* reexport safe */ _strings__rspack_import_1.hash),
661
+ isDate: () => (/* reexport safe */ _dates__rspack_import_2.isDate),
662
+ isNodeRuntime: () => (/* reexport safe */ _runtime__rspack_import_4.isNodeRuntime),
663
+ logger: () => (/* reexport safe */ _logger__rspack_import_11.logger),
664
+ noop: () => (/* reexport safe */ _functions__rspack_import_9.noop),
665
+ resolveBulkPersistChanges: () => (/* reexport safe */ _replication__rspack_import_6.resolveBulkPersistChanges),
666
+ stringifyObject: () => (/* reexport safe */ _strings__rspack_import_1.stringifyObject),
667
+ toEventArray: () => (/* reexport safe */ _dbPluginEventUtils__rspack_import_8.toEventArray),
668
+ toMap: () => (/* reexport safe */ _arrays__rspack_import_0.toMap),
669
+ unsafeCast: () => (/* reexport safe */ _unsafeCast__rspack_import_10.unsafeCast),
670
+ uuid: () => (/* reexport safe */ _uuid__rspack_import_5.uuid),
671
+ uuidv4: () => (/* reexport safe */ _uuid__rspack_import_5.uuidv4)
689
672
  });
690
- /* ESM import */var _arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrays */ "./src/utilities/arrays.ts");
691
- /* ESM import */var _strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings */ "./src/utilities/strings.ts");
692
- /* ESM import */var _dates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dates */ "./src/utilities/dates.ts");
693
- /* ESM import */var _objects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./objects */ "./src/utilities/objects.ts");
694
- /* ESM import */var _runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./runtime */ "./src/utilities/runtime.ts");
695
- /* ESM import */var _uuid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./uuid */ "./src/utilities/uuid.ts");
696
- /* ESM import */var _replication__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./replication */ "./src/utilities/replication.ts");
697
- /* ESM import */var _queryOptionsCollection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./queryOptionsCollection */ "./src/utilities/queryOptionsCollection.ts");
698
- /* ESM import */var _dbPluginEventUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dbPluginEventUtils */ "./src/utilities/dbPluginEventUtils.ts");
699
- /* ESM import */var _functions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./functions */ "./src/utilities/functions.ts");
700
- /* ESM import */var _unsafeCast__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./unsafeCast */ "./src/utilities/unsafeCast.ts");
673
+ /* import */ var _arrays__rspack_import_0 = __webpack_require__("./src/utilities/arrays.ts");
674
+ /* import */ var _strings__rspack_import_1 = __webpack_require__("./src/utilities/strings.ts");
675
+ /* import */ var _dates__rspack_import_2 = __webpack_require__("./src/utilities/dates.ts");
676
+ /* import */ var _objects__rspack_import_3 = __webpack_require__("./src/utilities/objects.ts");
677
+ /* import */ var _runtime__rspack_import_4 = __webpack_require__("./src/utilities/runtime.ts");
678
+ /* import */ var _uuid__rspack_import_5 = __webpack_require__("./src/utilities/uuid.ts");
679
+ /* import */ var _replication__rspack_import_6 = __webpack_require__("./src/utilities/replication.ts");
680
+ /* import */ var _queryOptionsCollection__rspack_import_7 = __webpack_require__("./src/utilities/queryOptionsCollection.ts");
681
+ /* import */ var _dbPluginEventUtils__rspack_import_8 = __webpack_require__("./src/utilities/dbPluginEventUtils.ts");
682
+ /* import */ var _functions__rspack_import_9 = __webpack_require__("./src/utilities/functions.ts");
683
+ /* import */ var _unsafeCast__rspack_import_10 = __webpack_require__("./src/utilities/unsafeCast.ts");
684
+ /* import */ var _logger__rspack_import_11 = __webpack_require__("./src/utilities/logger.ts");
685
+
701
686
 
702
687
 
703
688
 
@@ -720,6 +705,7 @@ var __webpack_exports__fastHash = __webpack_exports__.fastHash;
720
705
  var __webpack_exports__hash = __webpack_exports__.hash;
721
706
  var __webpack_exports__isDate = __webpack_exports__.isDate;
722
707
  var __webpack_exports__isNodeRuntime = __webpack_exports__.isNodeRuntime;
708
+ var __webpack_exports__logger = __webpack_exports__.logger;
723
709
  var __webpack_exports__noop = __webpack_exports__.noop;
724
710
  var __webpack_exports__resolveBulkPersistChanges = __webpack_exports__.resolveBulkPersistChanges;
725
711
  var __webpack_exports__stringifyObject = __webpack_exports__.stringifyObject;
@@ -728,6 +714,6 @@ var __webpack_exports__toMap = __webpack_exports__.toMap;
728
714
  var __webpack_exports__unsafeCast = __webpack_exports__.unsafeCast;
729
715
  var __webpack_exports__uuid = __webpack_exports__.uuid;
730
716
  var __webpack_exports__uuidv4 = __webpack_exports__.uuidv4;
731
- export { __webpack_exports__cast as cast, __webpack_exports__clone as clone, __webpack_exports__combineQueryOptionsCollections as combineQueryOptionsCollections, __webpack_exports__fastHash as fastHash, __webpack_exports__hash as hash, __webpack_exports__isDate as isDate, __webpack_exports__isNodeRuntime as isNodeRuntime, __webpack_exports__noop as noop, __webpack_exports__resolveBulkPersistChanges as resolveBulkPersistChanges, __webpack_exports__stringifyObject as stringifyObject, __webpack_exports__toEventArray as toEventArray, __webpack_exports__toMap as toMap, __webpack_exports__unsafeCast as unsafeCast, __webpack_exports__uuid as uuid, __webpack_exports__uuidv4 as uuidv4 };
717
+ export { __webpack_exports__cast as cast, __webpack_exports__clone as clone, __webpack_exports__combineQueryOptionsCollections as combineQueryOptionsCollections, __webpack_exports__fastHash as fastHash, __webpack_exports__hash as hash, __webpack_exports__isDate as isDate, __webpack_exports__isNodeRuntime as isNodeRuntime, __webpack_exports__logger as logger, __webpack_exports__noop as noop, __webpack_exports__resolveBulkPersistChanges as resolveBulkPersistChanges, __webpack_exports__stringifyObject as stringifyObject, __webpack_exports__toEventArray as toEventArray, __webpack_exports__toMap as toMap, __webpack_exports__unsafeCast as unsafeCast, __webpack_exports__uuid as uuid, __webpack_exports__uuidv4 as uuidv4 };
732
718
 
733
719
  //# sourceMappingURL=index.js.map