@routier/core 0.0.4 → 0.0.6
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/capabilities/Capability.d.ts +21 -0
- package/dist/capabilities/PerformanceCapability.d.ts +15 -0
- package/dist/capabilities/TracingCapability.d.ts +14 -0
- package/dist/capabilities/index.d.ts +4 -0
- package/dist/capabilities/index.js +707 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/performance/PerformanceTracker.d.ts +11 -0
- package/dist/capabilities/tracing/CallTraceManager.d.ts +12 -0
- package/dist/capabilities/types.d.ts +26 -0
- package/dist/codegen/index.js +621 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +724 -522
- package/dist/index.js.map +1 -1
- package/dist/pipeline/TrampolinePipeline.d.ts +0 -1
- package/dist/pipeline/WorkPipeline.test.d.ts +1 -0
- package/dist/pipeline/index.js +47 -71
- package/dist/pipeline/index.js.map +1 -1
- package/dist/plugins/EphemeralDataPlugin.test.d.ts +1 -0
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.js +128 -550
- package/dist/plugins/index.js.map +1 -1
- package/dist/schema/index.js +4 -3
- package/dist/schema/index.js.map +1 -1
- package/package.json +5 -1
- package/dist/plugins/capabilities/DbPluginCapability.d.ts +0 -23
- package/dist/plugins/capabilities/index.d.ts +0 -2
- package/dist/plugins/capabilities/logging/DbPluginLoggingCapability.d.ts +0 -28
- package/dist/plugins/capabilities/logging/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routier/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"./expressions": "./dist/expressions/index.js",
|
|
25
25
|
"./errors": "./dist/errors/index.js",
|
|
26
26
|
"./performance": "./dist/performance/index.js",
|
|
27
|
+
"./capabilities": "./dist/capabilities/index.js",
|
|
27
28
|
"./types": "./dist/types/index.js"
|
|
28
29
|
},
|
|
29
30
|
"typesVersions": {
|
|
@@ -58,6 +59,9 @@
|
|
|
58
59
|
"assertions": [
|
|
59
60
|
"./dist/assertions/index.d.ts"
|
|
60
61
|
],
|
|
62
|
+
"capabilities": [
|
|
63
|
+
"./dist/capabilities/index.d.ts"
|
|
64
|
+
],
|
|
61
65
|
"types": [
|
|
62
66
|
"./dist/types/index.d.ts"
|
|
63
67
|
]
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BulkPersistResult } from "../../collections";
|
|
2
|
-
import { PluginEventPartialResultType, PluginEventResultType } from "../../results";
|
|
3
|
-
import { DbPluginBulkPersistEvent, DbPluginEvent, DbPluginQueryEvent, IDbPlugin } from "../types";
|
|
4
|
-
export type DbPluginCapabilityEvent = "queryStart" | "queryComplete" | "destroyStart" | "destroyComplete" | "bulkPersistStart" | "bulkPersistComplete";
|
|
5
|
-
export interface IDbPluginCapability {
|
|
6
|
-
apply<T extends IDbPlugin>(plugin: T): void;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Extends plugin functionality through hooks and event handlers without
|
|
10
|
-
* changing the plugin's type (mixin). Essential for maintaining type safety
|
|
11
|
-
* in routier's core systems.
|
|
12
|
-
*/
|
|
13
|
-
export declare class DbPluginCapability {
|
|
14
|
-
private events;
|
|
15
|
-
add<TRoot extends {}, TShape extends any = TRoot>(name: "queryStart", callback: (event: DbPluginQueryEvent<TRoot, TShape>) => void): DbPluginCapability;
|
|
16
|
-
add<TRoot extends {}, TShape extends any = TRoot>(name: "queryComplete", callback: (event: PluginEventResultType<TShape>) => void): DbPluginCapability;
|
|
17
|
-
add<TRoot extends {}, TShape extends any = TRoot>(name: "destroyStart", callback: (event: DbPluginEvent) => void): DbPluginCapability;
|
|
18
|
-
add<TRoot extends {}, TShape extends any = TRoot>(name: "destroyComplete", callback: (event: PluginEventResultType<never>) => void): DbPluginCapability;
|
|
19
|
-
add<TRoot extends {}, TShape extends any = TRoot>(name: "bulkPersistStart", callback: (event: DbPluginBulkPersistEvent) => void): DbPluginCapability;
|
|
20
|
-
add<TRoot extends {}, TShape extends any = TRoot>(name: "bulkPersistComplete", callback: (event: PluginEventPartialResultType<BulkPersistResult>) => void): DbPluginCapability;
|
|
21
|
-
private resolve;
|
|
22
|
-
apply<T extends IDbPlugin>(plugin: T): void;
|
|
23
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IDbPlugin } from "../../../plugins/types";
|
|
2
|
-
import { IDbPluginCapability } from "../DbPluginCapability";
|
|
3
|
-
export declare class DbPluginLoggingCapability implements IDbPluginCapability {
|
|
4
|
-
private logStyle;
|
|
5
|
-
private maxLogEntries;
|
|
6
|
-
private logHistory;
|
|
7
|
-
private queryPerformance;
|
|
8
|
-
constructor(options?: {
|
|
9
|
-
logStyle?: 'minimal' | 'detailed' | 'redux';
|
|
10
|
-
maxLogEntries?: number;
|
|
11
|
-
});
|
|
12
|
-
apply<T extends IDbPlugin>(plugin: T): void;
|
|
13
|
-
private getPerformanceIndicator;
|
|
14
|
-
private logReduxAction;
|
|
15
|
-
private extractQueryOptions;
|
|
16
|
-
private getResultCount;
|
|
17
|
-
private getResultType;
|
|
18
|
-
private extractBulkOperations;
|
|
19
|
-
private countCompletedOperations;
|
|
20
|
-
private addToHistory;
|
|
21
|
-
private generateId;
|
|
22
|
-
getLogHistory(): {
|
|
23
|
-
type: string;
|
|
24
|
-
timestamp: number;
|
|
25
|
-
data: any;
|
|
26
|
-
}[];
|
|
27
|
-
clearLogHistory(): void;
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DbPluginLoggingCapability';
|