@objectql/core 4.2.0 → 4.2.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +34 -0
- package/README.md +5 -2
- package/dist/app.d.ts +61 -52
- package/dist/app.js +100 -435
- package/dist/app.js.map +1 -1
- package/dist/index.d.ts +14 -20
- package/dist/index.js +21 -20
- package/dist/index.js.map +1 -1
- package/dist/kernel-factory.d.ts +38 -0
- package/dist/kernel-factory.js +38 -0
- package/dist/kernel-factory.js.map +1 -0
- package/dist/plugin.d.ts +9 -16
- package/dist/plugin.js +71 -48
- package/dist/plugin.js.map +1 -1
- package/dist/repository.d.ts +4 -31
- package/dist/repository.js +7 -283
- package/dist/repository.js.map +1 -1
- package/dist/util.js +4 -2
- package/dist/util.js.map +1 -1
- package/package.json +14 -12
- package/src/app.ts +156 -539
- package/src/index.ts +18 -42
- package/src/kernel-factory.ts +47 -0
- package/src/plugin.ts +77 -85
- package/src/repository.ts +4 -320
- package/src/util.ts +5 -3
- package/test/__mocks__/@objectstack/core.ts +250 -1
- package/test/__mocks__/@objectstack/objectql.ts +273 -0
- package/test/__mocks__/@objectstack/runtime.ts +14 -5
- package/test/introspection.test.ts +1 -1
- package/test/mock-driver.ts +5 -5
- package/test/optimizations.test.ts +2 -2
- package/test/plugin-integration.test.ts +1 -3
- package/test/utils.ts +6 -6
- package/tsconfig.json +3 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/ai/index.d.ts +0 -8
- package/dist/ai/index.js +0 -25
- package/dist/ai/index.js.map +0 -1
- package/dist/ai/registry.d.ts +0 -23
- package/dist/ai/registry.js +0 -78
- package/dist/ai/registry.js.map +0 -1
- package/dist/gateway.d.ts +0 -37
- package/dist/gateway.js +0 -93
- package/dist/gateway.js.map +0 -1
- package/dist/optimizations/CompiledHookManager.d.ts +0 -56
- package/dist/optimizations/CompiledHookManager.js +0 -170
- package/dist/optimizations/CompiledHookManager.js.map +0 -1
- package/dist/optimizations/DependencyGraph.d.ts +0 -82
- package/dist/optimizations/DependencyGraph.js +0 -211
- package/dist/optimizations/DependencyGraph.js.map +0 -1
- package/dist/optimizations/GlobalConnectionPool.d.ts +0 -89
- package/dist/optimizations/GlobalConnectionPool.js +0 -193
- package/dist/optimizations/GlobalConnectionPool.js.map +0 -1
- package/dist/optimizations/LazyMetadataLoader.d.ts +0 -75
- package/dist/optimizations/LazyMetadataLoader.js +0 -149
- package/dist/optimizations/LazyMetadataLoader.js.map +0 -1
- package/dist/optimizations/OptimizedMetadataRegistry.d.ts +0 -26
- package/dist/optimizations/OptimizedMetadataRegistry.js +0 -117
- package/dist/optimizations/OptimizedMetadataRegistry.js.map +0 -1
- package/dist/optimizations/OptimizedValidationEngine.d.ts +0 -73
- package/dist/optimizations/OptimizedValidationEngine.js +0 -141
- package/dist/optimizations/OptimizedValidationEngine.js.map +0 -1
- package/dist/optimizations/QueryCompiler.d.ts +0 -51
- package/dist/optimizations/QueryCompiler.js +0 -216
- package/dist/optimizations/QueryCompiler.js.map +0 -1
- package/dist/optimizations/SQLQueryOptimizer.d.ts +0 -96
- package/dist/optimizations/SQLQueryOptimizer.js +0 -265
- package/dist/optimizations/SQLQueryOptimizer.js.map +0 -1
- package/dist/optimizations/index.d.ts +0 -32
- package/dist/optimizations/index.js +0 -44
- package/dist/optimizations/index.js.map +0 -1
- package/dist/protocol.d.ts +0 -191
- package/dist/protocol.js +0 -272
- package/dist/protocol.js.map +0 -1
- package/dist/query/filter-translator.d.ts +0 -24
- package/dist/query/filter-translator.js +0 -38
- package/dist/query/filter-translator.js.map +0 -1
- package/dist/query/index.d.ts +0 -22
- package/dist/query/index.js +0 -39
- package/dist/query/index.js.map +0 -1
- package/dist/query/query-analyzer.d.ts +0 -186
- package/dist/query/query-analyzer.js +0 -348
- package/dist/query/query-analyzer.js.map +0 -1
- package/dist/query/query-builder.d.ts +0 -27
- package/dist/query/query-builder.js +0 -69
- package/dist/query/query-builder.js.map +0 -1
- package/dist/query/query-service.d.ts +0 -151
- package/dist/query/query-service.js +0 -272
- package/dist/query/query-service.js.map +0 -1
- package/src/ai/index.ts +0 -9
- package/src/ai/registry.ts +0 -81
- package/src/gateway.ts +0 -105
- package/src/optimizations/CompiledHookManager.ts +0 -193
- package/src/optimizations/DependencyGraph.ts +0 -255
- package/src/optimizations/GlobalConnectionPool.ts +0 -251
- package/src/optimizations/LazyMetadataLoader.ts +0 -180
- package/src/optimizations/OptimizedMetadataRegistry.ts +0 -132
- package/src/optimizations/OptimizedValidationEngine.ts +0 -172
- package/src/optimizations/QueryCompiler.ts +0 -242
- package/src/optimizations/SQLQueryOptimizer.ts +0 -329
- package/src/optimizations/index.ts +0 -34
- package/src/protocol.ts +0 -304
- package/src/query/filter-translator.ts +0 -41
- package/src/query/index.ts +0 -24
- package/src/query/query-analyzer.ts +0 -532
- package/src/query/query-builder.ts +0 -64
- package/src/query/query-service.ts +0 -397
- package/test/ai-registry.test.ts +0 -42
- package/test/app.test.ts +0 -578
- package/test/filter-syntax.test.ts +0 -233
- package/test/gateway.test.ts +0 -88
- package/test/protocol.test.ts +0 -143
- package/test/repository-validation.test.ts +0 -351
- package/test/repository.test.ts +0 -151
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @objectql/core
|
|
2
2
|
|
|
3
|
+
## 4.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9a30c50: Patch release for all packages
|
|
8
|
+
- @objectql/plugin-formula@4.2.2
|
|
9
|
+
- @objectql/plugin-optimizations@4.2.2
|
|
10
|
+
- @objectql/plugin-query@4.2.2
|
|
11
|
+
- @objectql/plugin-validator@4.2.2
|
|
12
|
+
- @objectql/types@4.2.2
|
|
13
|
+
|
|
14
|
+
## 4.2.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- a0aa26a: Unify all package versions and release a patch
|
|
19
|
+
- Updated dependencies [a0aa26a]
|
|
20
|
+
- @objectql/types@4.2.1
|
|
21
|
+
- @objectql/plugin-formula@4.2.1
|
|
22
|
+
- @objectql/plugin-optimizations@4.2.1
|
|
23
|
+
- @objectql/plugin-query@4.2.1
|
|
24
|
+
- @objectql/plugin-validator@4.2.1
|
|
25
|
+
|
|
3
26
|
## 4.2.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -47,6 +70,7 @@
|
|
|
47
70
|
This patch release includes bug fixes, driver improvements, and enhanced test coverage:
|
|
48
71
|
|
|
49
72
|
### Driver Improvements
|
|
73
|
+
|
|
50
74
|
- **MongoDB Driver**: Fixed bulk operations, transaction support, and type safety improvements
|
|
51
75
|
- **FileSystem Driver**: Fixed TCK test compatibility with dataDir parameter
|
|
52
76
|
- **SQL Driver**: Enhanced TCK test compatibility and fixed test failures
|
|
@@ -54,22 +78,26 @@
|
|
|
54
78
|
- **Driver Utils**: Added shared utilities package for cross-driver functionality
|
|
55
79
|
|
|
56
80
|
### Testing & Quality
|
|
81
|
+
|
|
57
82
|
- Added comprehensive TCK (Technology Compatibility Kit) compliance tests for all drivers
|
|
58
83
|
- Expanded TCK test suite to 30+ comprehensive tests
|
|
59
84
|
- Enhanced test infrastructure with better error handling
|
|
60
85
|
- Added --passWithNoTests flag for packages without tests
|
|
61
86
|
|
|
62
87
|
### Type Safety
|
|
88
|
+
|
|
63
89
|
- Improved type safety in MongoDB driver update methods
|
|
64
90
|
- Better handling of atomic operators in MongoDB driver
|
|
65
91
|
- Enhanced type definitions across driver layer
|
|
66
92
|
|
|
67
93
|
### Documentation
|
|
94
|
+
|
|
68
95
|
- Added comprehensive driver documentation
|
|
69
96
|
- Enhanced official documentation with Phase 2 implementation summaries
|
|
70
97
|
- Improved protocol layer documentation
|
|
71
98
|
|
|
72
99
|
### Infrastructure
|
|
100
|
+
|
|
73
101
|
- Standardized driver layer implementation
|
|
74
102
|
- Enhanced protocol layer with better abstraction
|
|
75
103
|
- Improved GitHub Actions workflow configurations
|
|
@@ -89,6 +117,7 @@
|
|
|
89
117
|
- **Patch Release v4.0.3**
|
|
90
118
|
|
|
91
119
|
This patch release includes infrastructure improvements and development experience enhancements:
|
|
120
|
+
|
|
92
121
|
- Refactored dev server setup for improved configuration handling
|
|
93
122
|
- Enhanced example scripts and development workflow
|
|
94
123
|
- Updated build and test infrastructure
|
|
@@ -107,6 +136,7 @@
|
|
|
107
136
|
- **Patch Release v4.0.2**
|
|
108
137
|
|
|
109
138
|
This patch release includes:
|
|
139
|
+
|
|
110
140
|
- Infrastructure improvements and maintenance updates
|
|
111
141
|
- Enhanced stability and reliability
|
|
112
142
|
- Bug fixes and performance optimizations
|
|
@@ -121,6 +151,7 @@
|
|
|
121
151
|
- **Release Version 4.0.1**
|
|
122
152
|
|
|
123
153
|
This patch release includes the latest repository improvements and infrastructure updates:
|
|
154
|
+
|
|
124
155
|
- Added comprehensive GitHub workflows for CI/CD, testing, and quality assurance
|
|
125
156
|
- Enhanced documentation and developer experience
|
|
126
157
|
- Improved build and release processes with Changesets
|
|
@@ -138,6 +169,7 @@
|
|
|
138
169
|
- 79d04e1: Patch release for January 2026 updates
|
|
139
170
|
|
|
140
171
|
This patch includes minor improvements and maintenance updates:
|
|
172
|
+
|
|
141
173
|
- Enhanced type safety across core packages
|
|
142
174
|
- Improved error handling in drivers
|
|
143
175
|
- Documentation updates
|
|
@@ -160,6 +192,7 @@
|
|
|
160
192
|
This is a coordinated major release that unifies all ObjectQL packages to version 2.0.0, establishing a synchronized versioning strategy across the entire ecosystem.
|
|
161
193
|
|
|
162
194
|
### 🎯 Key Changes
|
|
195
|
+
|
|
163
196
|
- **Unified Versioning**: All core packages now share the same version number (2.0.0)
|
|
164
197
|
- **Fixed Group Management**: Updated changeset configuration to include all @objectql packages in the fixed versioning group
|
|
165
198
|
- **Simplified Maintenance**: Future releases will automatically maintain version consistency across the entire monorepo
|
|
@@ -167,6 +200,7 @@
|
|
|
167
200
|
### 📦 Packages Included
|
|
168
201
|
|
|
169
202
|
All ObjectQL packages are now synchronized at version 2.0.0:
|
|
203
|
+
|
|
170
204
|
- Foundation: `@objectql/types`, `@objectql/core`, `@objectql/platform-node`
|
|
171
205
|
- Drivers: `@objectql/driver-sql`, `@objectql/driver-mongo`, `@objectql/driver-redis`, `@objectql/driver-fs`, `@objectql/driver-memory`, `@objectql/driver-localstorage`, `@objectql/driver-excel`, `@objectql/sdk`
|
|
172
206
|
- Runtime: `@objectql/server`
|
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# @objectql/core
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> ⚠️ **DEPRECATED**: This package is deprecated. Use [`@objectstack/objectql`](https://www.npmjs.com/package/@objectstack/objectql) instead.
|
|
4
|
+
> See the [Migration Guide](https://github.com/objectstack-ai/spec/blob/main/content/docs/guides/objectql-migration.mdx) for step-by-step instructions.
|
|
4
5
|
|
|
5
|
-
The core ORM and runtime engine for ObjectQL.
|
|
6
|
+
The core ORM and runtime engine for ObjectQL. All core functionality (ObjectQL engine, SchemaRegistry, createObjectQLKernel, utilities) is now available directly from `@objectstack/objectql`.
|
|
7
|
+
|
|
8
|
+
The `ObjectQLPlugin` (orchestrator composing sub-plugins like ValidatorPlugin, FormulaPlugin, QueryPlugin) remains in this package as it is specific to the `@objectql` ecosystem.
|
|
6
9
|
|
|
7
10
|
## Features
|
|
8
11
|
|
package/dist/app.d.ts
CHANGED
|
@@ -1,66 +1,75 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ObjectQL
|
|
2
|
+
* ObjectQL Bridge Class
|
|
3
3
|
* Copyright (c) 2026-present ObjectStack Inc.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Extends the upstream @objectstack/objectql.ObjectQL engine with:
|
|
6
|
+
* - Legacy constructor config (datasources map)
|
|
7
|
+
* - MetadataRegistry integration (for ObjectLoader filesystem loading)
|
|
8
|
+
*
|
|
9
|
+
* This allows existing consumers to keep using:
|
|
10
|
+
* const app = new ObjectQL({ datasources: { default: driver } });
|
|
11
|
+
* const loader = new ObjectLoader(app.metadata);
|
|
12
|
+
* await loader.load(dir);
|
|
13
|
+
* await app.init();
|
|
7
14
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
15
|
+
import { ObjectQL as UpstreamObjectQL } from '@objectstack/objectql';
|
|
16
|
+
import type { ServiceObject } from '@objectstack/spec/data';
|
|
17
|
+
import type { DriverInterface } from '@objectstack/core';
|
|
18
|
+
import { MetadataRegistry } from '@objectql/types';
|
|
19
|
+
import type { Driver } from '@objectql/types';
|
|
10
20
|
/**
|
|
11
|
-
* ObjectQL
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
* Legacy config shape accepted by the ObjectQL bridge constructor.
|
|
22
|
+
*/
|
|
23
|
+
export interface ObjectQLConfig {
|
|
24
|
+
datasources?: Record<string, Driver | DriverInterface>;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ObjectQL — drop-in replacement that bridges the upstream engine
|
|
29
|
+
* with the @objectql/types MetadataRegistry used by ObjectLoader.
|
|
15
30
|
*/
|
|
16
|
-
export declare class ObjectQL
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
constructor(config
|
|
28
|
-
use(plugin: Plugin): void;
|
|
29
|
-
removePackage(name: string): void;
|
|
30
|
-
on(event: HookName, objectName: string, handler: HookHandler, packageName?: string): void;
|
|
31
|
-
triggerHook(event: HookName, objectName: string, ctx: HookContext): Promise<void>;
|
|
32
|
-
registerAction(objectName: string, actionName: string, handler: ActionHandler, packageName?: string): void;
|
|
33
|
-
executeAction(objectName: string, actionName: string, ctx: ActionContext): Promise<any>;
|
|
34
|
-
createContext(options: ObjectQLContextOptions): ObjectQLContext;
|
|
31
|
+
export declare class ObjectQL extends UpstreamObjectQL {
|
|
32
|
+
/**
|
|
33
|
+
* Filesystem metadata registry populated by ObjectLoader.
|
|
34
|
+
* After calling loader.load(), call app.init() to sync these
|
|
35
|
+
* entries into the upstream SchemaRegistry & driver layer.
|
|
36
|
+
*/
|
|
37
|
+
readonly metadata: MetadataRegistry;
|
|
38
|
+
/** Typed self-reference for compat methods */
|
|
39
|
+
private get compat();
|
|
40
|
+
private pendingDrivers;
|
|
41
|
+
registerObject: (schema: ServiceObject, packageId?: string, namespace?: string) => string;
|
|
42
|
+
constructor(config?: ObjectQLConfig);
|
|
35
43
|
/**
|
|
36
|
-
*
|
|
44
|
+
* Initialize the engine.
|
|
37
45
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
46
|
+
* Before calling the upstream init (which connects drivers and syncs schemas),
|
|
47
|
+
* bridge all objects loaded via ObjectLoader into the upstream SchemaRegistry.
|
|
48
|
+
*/
|
|
49
|
+
init(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Sync all filesystem-loaded metadata into the upstream SchemaRegistry.
|
|
52
|
+
* Called automatically by init(), but can also be called manually.
|
|
53
|
+
*/
|
|
54
|
+
private syncMetadataToRegistry;
|
|
55
|
+
/**
|
|
56
|
+
* Get an object definition by name.
|
|
40
57
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
58
|
+
* Checks the upstream SchemaRegistry first, then falls back to the
|
|
59
|
+
* local MetadataRegistry for objects loaded via ObjectLoader but
|
|
60
|
+
* not yet synced (i.e., init() hasn't been called yet).
|
|
43
61
|
*/
|
|
44
|
-
|
|
45
|
-
registerObject(object: ObjectConfig): void;
|
|
46
|
-
unregisterObject(name: string): void;
|
|
47
|
-
getObject(name: string): ObjectConfig | undefined;
|
|
48
|
-
getConfigs(): Record<string, ObjectConfig>;
|
|
49
|
-
datasource(name: string): Driver;
|
|
62
|
+
getObject(name: string): ServiceObject | undefined;
|
|
50
63
|
/**
|
|
51
|
-
*
|
|
52
|
-
* This allows connecting to an existing database without defining metadata.
|
|
64
|
+
* Get all registered object configs as a name→config map.
|
|
53
65
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* @returns Array of registered ObjectConfig
|
|
66
|
+
* Merges results from the upstream SchemaRegistry with the
|
|
67
|
+
* local MetadataRegistry (for pre-init objects).
|
|
57
68
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
init(): Promise<void>;
|
|
65
|
-
private processInitialData;
|
|
69
|
+
getConfigs(): Record<string, ServiceObject>;
|
|
70
|
+
/**
|
|
71
|
+
* Remove all hooks, actions, and objects contributed by a package.
|
|
72
|
+
* Also cleans up the local MetadataRegistry.
|
|
73
|
+
*/
|
|
74
|
+
removePackage(packageId: string): void;
|
|
66
75
|
}
|