@routier/core 0.1.0-rc.2 → 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.
- package/dist/assertions/index.js +4 -15
- package/dist/assertions/index.js.map +1 -1
- package/dist/capabilities/index.js +58 -97
- package/dist/capabilities/index.js.map +1 -1
- package/dist/codegen/index.js +21 -36
- package/dist/codegen/index.js.map +1 -1
- package/dist/collections/index.js +49 -92
- package/dist/collections/index.js.map +1 -1
- package/dist/errors/index.js +4 -15
- package/dist/errors/index.js.map +1 -1
- package/dist/expressions/index.js +62 -93
- package/dist/expressions/index.js.map +1 -1
- package/dist/index.js +1683 -2302
- package/dist/index.js.map +1 -1
- package/dist/performance/index.js +4 -15
- package/dist/performance/index.js.map +1 -1
- package/dist/pipeline/index.js +30 -53
- package/dist/pipeline/index.js.map +1 -1
- package/dist/plugins/index.js +260 -361
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +6 -5
- package/dist/plugins/replication/ReplicationDbPlugin.d.ts +5 -5
- package/dist/plugins/replication/types.d.ts +1 -0
- package/dist/plugins/types.d.ts +1 -1
- package/dist/results/index.js +11 -26
- package/dist/results/index.js.map +1 -1
- package/dist/schema/SchemaDefinition.d.ts +7 -6
- package/dist/schema/index.js +1073 -1490
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/testSchemas.test.d.ts +14 -14
- package/dist/schema/types.d.ts +5 -3
- package/dist/types/index.js +0 -6
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/index.js +61 -124
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/types.d.ts +17 -2
- package/package.json +1 -1
- package/readme.md +1 -1
|
@@ -4,15 +4,16 @@ import { BulkPersistResult } from '../../collections';
|
|
|
4
4
|
import { ITranslatedValue } from '../translators';
|
|
5
5
|
export declare class OptimisticReplicationDbPlugin implements IDbPlugin {
|
|
6
6
|
protected plugins: OptimisticReplicationPluginOptions;
|
|
7
|
-
|
|
7
|
+
private collectionHydrationStatuses;
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new OptimisticDbPluginReplicator that coordinates operations between a source database and its replicas.
|
|
10
10
|
*
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @
|
|
11
|
+
* @param plugins Configuration object containing the source, read, and replica database plugins
|
|
12
|
+
* @param plugins.source The primary database plugin that will receive all operations first
|
|
13
|
+
* @param plugins.read The read-optimized plugin (typically a memory plugin) used for fast queries
|
|
14
|
+
* @param plugins.replicas Additional database plugins that will replicate operations from the source
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
constructor(plugins: OptimisticReplicationPluginOptions);
|
|
16
17
|
/**
|
|
17
18
|
* Will query the read plugin if there is one, otherwise the source plugin will be queried
|
|
18
19
|
*/
|
|
@@ -4,15 +4,15 @@ import { BulkPersistResult } from '../../collections';
|
|
|
4
4
|
import { ITranslatedValue } from '../translators';
|
|
5
5
|
export declare class ReplicationDbPlugin implements IDbPlugin {
|
|
6
6
|
plugins: ReplicationPluginOptions;
|
|
7
|
-
protected constructor(plugins: ReplicationPluginOptions);
|
|
8
7
|
/**
|
|
9
8
|
* Creates a new DbPluginReplicator that coordinates operations between a source database and its replicas.
|
|
10
9
|
*
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @
|
|
10
|
+
* @param plugins Configuration object containing the source, read (optional), and replica database plugins
|
|
11
|
+
* @param plugins.source The primary database plugin that will receive all operations first
|
|
12
|
+
* @param plugins.read Optional read-optimized plugin (typically a memory plugin) used for fast queries
|
|
13
|
+
* @param plugins.replicas Additional database plugins that will replicate operations from the source
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
constructor(plugins: ReplicationPluginOptions);
|
|
16
16
|
/**
|
|
17
17
|
* Will query the read plugin if there is one, otherwise the source plugin will be queried
|
|
18
18
|
*/
|
|
@@ -2,3 +2,4 @@ import { IDbPlugin, ReplicationPluginOptions, OptimisticReplicationPluginOptions
|
|
|
2
2
|
export type IDbPluginReplicator = IDbPlugin & {
|
|
3
3
|
plugins: ReplicationPluginOptions | OptimisticReplicationPluginOptions;
|
|
4
4
|
};
|
|
5
|
+
export type HydrationStatus = "pending" | "fulfilled" | "rejected";
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export type DbPluginEvent = {
|
|
|
42
42
|
/** Unique id of the event. */
|
|
43
43
|
id: string;
|
|
44
44
|
/** Source of the request */
|
|
45
|
-
source: "data-store" | "collection" | "view";
|
|
45
|
+
source: "data-store" | "collection" | "view" | "capability";
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
48
|
* Event for a specific plugin operation, extending the base event with an operation payload.
|
package/dist/results/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
var __webpack_modules__ = ({
|
|
2
|
-
"./src/results/Result.ts"
|
|
3
|
-
/*!*******************************!*\
|
|
4
|
-
!*** ./src/results/Result.ts ***!
|
|
5
|
-
\*******************************/
|
|
6
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2
|
+
"./src/results/Result.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
7
3
|
__webpack_require__.r(__webpack_exports__);
|
|
8
4
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
5
|
PluginEventResult: () => (PluginEventResult),
|
|
@@ -85,22 +81,18 @@ class PluginEventResult extends BaseResult {
|
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
|
|
88
|
-
}
|
|
89
|
-
"./src/results/utils.ts"
|
|
90
|
-
/*!******************************!*\
|
|
91
|
-
!*** ./src/results/utils.ts ***!
|
|
92
|
-
\******************************/
|
|
93
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
84
|
+
},
|
|
85
|
+
"./src/results/utils.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
94
86
|
__webpack_require__.r(__webpack_exports__);
|
|
95
87
|
__webpack_require__.d(__webpack_exports__, {
|
|
96
88
|
toPromise: () => (toPromise)
|
|
97
89
|
});
|
|
98
|
-
/*
|
|
90
|
+
/* import */ var _Result__rspack_import_0 = __webpack_require__("./src/results/Result.ts");
|
|
99
91
|
|
|
100
92
|
function toPromise(fn) {
|
|
101
93
|
return new Promise((resolve, reject) => {
|
|
102
94
|
fn((r) => {
|
|
103
|
-
if (r.ok ===
|
|
95
|
+
if (r.ok === _Result__rspack_import_0.Result.ERROR) {
|
|
104
96
|
reject(r.error);
|
|
105
97
|
return;
|
|
106
98
|
}
|
|
@@ -110,10 +102,9 @@ function toPromise(fn) {
|
|
|
110
102
|
}
|
|
111
103
|
|
|
112
104
|
|
|
113
|
-
}
|
|
105
|
+
},
|
|
114
106
|
|
|
115
107
|
});
|
|
116
|
-
/************************************************************************/
|
|
117
108
|
// The module cache
|
|
118
109
|
var __webpack_module_cache__ = {};
|
|
119
110
|
|
|
@@ -137,7 +128,6 @@ return module.exports;
|
|
|
137
128
|
|
|
138
129
|
}
|
|
139
130
|
|
|
140
|
-
/************************************************************************/
|
|
141
131
|
// webpack/runtime/define_property_getters
|
|
142
132
|
(() => {
|
|
143
133
|
__webpack_require__.d = (exports, definition) => {
|
|
@@ -162,22 +152,17 @@ __webpack_require__.r = (exports) => {
|
|
|
162
152
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
163
153
|
};
|
|
164
154
|
})();
|
|
165
|
-
/************************************************************************/
|
|
166
155
|
var __webpack_exports__ = {};
|
|
167
156
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
168
157
|
(() => {
|
|
169
|
-
|
|
170
|
-
/*!******************************!*\
|
|
171
|
-
!*** ./src/results/index.ts ***!
|
|
172
|
-
\******************************/
|
|
173
158
|
__webpack_require__.r(__webpack_exports__);
|
|
174
159
|
__webpack_require__.d(__webpack_exports__, {
|
|
175
|
-
PluginEventResult: () => (/* reexport safe */
|
|
176
|
-
Result: () => (/* reexport safe */
|
|
177
|
-
toPromise: () => (/* reexport safe */
|
|
160
|
+
PluginEventResult: () => (/* reexport safe */ _Result__rspack_import_0.PluginEventResult),
|
|
161
|
+
Result: () => (/* reexport safe */ _Result__rspack_import_0.Result),
|
|
162
|
+
toPromise: () => (/* reexport safe */ _utils__rspack_import_1.toPromise)
|
|
178
163
|
});
|
|
179
|
-
/*
|
|
180
|
-
/*
|
|
164
|
+
/* import */ var _Result__rspack_import_0 = __webpack_require__("./src/results/Result.ts");
|
|
165
|
+
/* import */ var _utils__rspack_import_1 = __webpack_require__("./src/results/utils.ts");
|
|
181
166
|
|
|
182
167
|
|
|
183
168
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results/index.js","sources":["webpack://@routier/core/./src/results/Result.ts","webpack://@routier/core/./src/results/utils.ts","webpack://@routier/core/webpack/runtime/define_property_getters","webpack://@routier/core/webpack/runtime/has_own_property","webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/results/index.ts"],"sourcesContent":["import { PartialResultType, PluginEventPartialResultType, PluginEventResultType, ResultType } from \"./types\";\n\nabstract class BaseResult {\n static ERROR = \"error\" as const;\n static SUCCESS = \"success\" as const;\n static PARTIAL = \"partial\" as const;\n\n static resolve<T>(result: ResultType<T> | PartialResultType<T>, resolve: (data: T) => void, reject: (error?: any) => void) {\n if (result.ok === BaseResult.SUCCESS) {\n resolve(result.data);\n return;\n }\n\n if (result.ok === BaseResult.PARTIAL) {\n reject({\n partial: result.data,\n error: result.error\n });\n return;\n }\n\n reject(result.error);\n }\n\n static assertSuccess<T>(result: any): asserts result is { ok: \"success\"; data: T } {\n if (result.ok !== BaseResult.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n\nexport class Result extends BaseResult {\n static success<T>(data: T): ResultType<T>;\n static success<T>(): ResultType<never>;\n static success<T>(data?: T): ResultType<T> {\n return {\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(error: any): ResultType<T> {\n return {\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(data: T, error: any): PartialResultType<T> {\n return {\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n}\n\nexport class PluginEventResult extends BaseResult {\n static success<T>(id: string, data: T): PluginEventResultType<T>;\n static success<T>(id: string): PluginEventResultType<never>;\n static success<T>(id: string, data?: T): PluginEventResultType<T> {\n return {\n id,\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(id: string, error: any): PluginEventResultType<T> {\n return {\n id,\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(id: string, data: T, error: any): PluginEventPartialResultType<T> {\n return {\n id,\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n\n static assertSuccess<T>(result: PluginEventResultType<T>): asserts result is { ok: \"success\"; data: T; id: string } {\n if (result.ok !== Result.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n","import { Result } from \"./Result\";\nimport { CallbackResult } from \"./types\";\n\nexport function toPromise<T>(fn: (callback: CallbackResult<T>) => void) {\n return new Promise<T>((resolve, reject) => {\n fn((r) => {\n if (r.ok === Result.ERROR) {\n reject(r.error);\n return;\n }\n\n resolve(r.data);\n });\n });\n}\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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 * from './Result';\nexport * from './types';\nexport * from './utils';"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"results/index.js","sources":["webpack://@routier/core/./src/results/Result.ts","webpack://@routier/core/./src/results/utils.ts","webpack://@routier/core/webpack/runtime/define_property_getters","webpack://@routier/core/webpack/runtime/has_own_property","webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/results/index.ts"],"sourcesContent":["import { PartialResultType, PluginEventPartialResultType, PluginEventResultType, ResultType } from \"./types\";\n\nabstract class BaseResult {\n static ERROR = \"error\" as const;\n static SUCCESS = \"success\" as const;\n static PARTIAL = \"partial\" as const;\n\n static resolve<T>(result: ResultType<T> | PartialResultType<T>, resolve: (data: T) => void, reject: (error?: any) => void) {\n if (result.ok === BaseResult.SUCCESS) {\n resolve(result.data);\n return;\n }\n\n if (result.ok === BaseResult.PARTIAL) {\n reject({\n partial: result.data,\n error: result.error\n });\n return;\n }\n\n reject(result.error);\n }\n\n static assertSuccess<T>(result: any): asserts result is { ok: \"success\"; data: T } {\n if (result.ok !== BaseResult.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n\nexport class Result extends BaseResult {\n static success<T>(data: T): ResultType<T>;\n static success<T>(): ResultType<never>;\n static success<T>(data?: T): ResultType<T> {\n return {\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(error: any): ResultType<T> {\n return {\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(data: T, error: any): PartialResultType<T> {\n return {\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n}\n\nexport class PluginEventResult extends BaseResult {\n static success<T>(id: string, data: T): PluginEventResultType<T>;\n static success<T>(id: string): PluginEventResultType<never>;\n static success<T>(id: string, data?: T): PluginEventResultType<T> {\n return {\n id,\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(id: string, error: any): PluginEventResultType<T> {\n return {\n id,\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(id: string, data: T, error: any): PluginEventPartialResultType<T> {\n return {\n id,\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n\n static assertSuccess<T>(result: PluginEventResultType<T>): asserts result is { ok: \"success\"; data: T; id: string } {\n if (result.ok !== Result.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n","import { Result } from \"./Result\";\nimport { CallbackResult } from \"./types\";\n\nexport function toPromise<T>(fn: (callback: CallbackResult<T>) => void) {\n return new Promise<T>((resolve, reject) => {\n fn((r) => {\n if (r.ok === Result.ERROR) {\n reject(r.error);\n return;\n }\n\n resolve(r.data);\n });\n });\n}\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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 * from './Result';\nexport * from './types';\nexport * from './utils';"],"names":[],"mappings":"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"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { SchemaFunction } from './table/SchemaFunction';
|
|
2
2
|
import { SchemaComputed } from './table/SchemaComputed';
|
|
3
3
|
import { SchemaBase } from "./property/base/SchemaBase";
|
|
4
|
-
import { CompiledSchema, InferType, SchemaTypes } from './types';
|
|
4
|
+
import { CollectionName, CompiledSchema, InferType, SchemaTypes } from './types';
|
|
5
5
|
export declare class SchemaDefinition<T extends {}> extends SchemaBase<T, any> {
|
|
6
6
|
instance: T;
|
|
7
7
|
type: SchemaTypes;
|
|
8
|
-
collectionName:
|
|
9
|
-
constructor(collectionName:
|
|
8
|
+
collectionName: CollectionName;
|
|
9
|
+
constructor(collectionName: CollectionName, schema: T);
|
|
10
|
+
private createReturnFunction;
|
|
11
|
+
private createFunction;
|
|
10
12
|
modify<R>(builder: (d: {
|
|
11
|
-
function: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName:
|
|
12
|
-
computed: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName:
|
|
13
|
+
function: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: CollectionName, injected: I) => UU, injected?: I) => SchemaFunction<UU, I, "unmapped">;
|
|
14
|
+
computed: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: CollectionName, injected: I) => UU, injected?: I) => SchemaComputed<UU, I, "computed" | "unmapped">;
|
|
13
15
|
}) => R): SchemaDefinition<R & T>;
|
|
14
16
|
private _iterate;
|
|
15
|
-
private createChangeTracker;
|
|
16
17
|
compile(): CompiledSchema<T>;
|
|
17
18
|
}
|