@objectql/cli 4.0.6 → 4.1.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectql/cli",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Command-line interface for ObjectQL - Code generation, migrations, REPL, and AI-powered development tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"objectql",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"prettier": "^3.0.0",
|
|
34
34
|
"ts-node": "^10.9.1",
|
|
35
35
|
"dotenv": "^16.4.5",
|
|
36
|
-
"@objectql/types": "4.0
|
|
37
|
-
"@objectql/core": "4.0
|
|
38
|
-
"@objectql/plugin-validator": "4.0
|
|
39
|
-
"@objectql/protocol-rest": "4.0
|
|
40
|
-
"@objectql/driver-sql": "4.0
|
|
41
|
-
"@objectql/platform-node": "4.0
|
|
36
|
+
"@objectql/types": "4.1.0",
|
|
37
|
+
"@objectql/core": "4.1.0",
|
|
38
|
+
"@objectql/plugin-validator": "4.1.0",
|
|
39
|
+
"@objectql/protocol-rest": "4.1.0",
|
|
40
|
+
"@objectql/driver-sql": "4.1.0",
|
|
41
|
+
"@objectql/platform-node": "4.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "^5.0.0",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Mock for @objectstack/core
|
|
2
|
+
// Used to bypass ESM/import.meta issues in Jest
|
|
3
|
+
|
|
4
|
+
const mockLogger = {
|
|
5
|
+
info: jest.fn(),
|
|
6
|
+
error: jest.fn(),
|
|
7
|
+
warn: jest.fn(),
|
|
8
|
+
debug: jest.fn(),
|
|
9
|
+
log: jest.fn(),
|
|
10
|
+
child: () => mockLogger
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function DummyKernel(...args) {
|
|
14
|
+
const self = this || {};
|
|
15
|
+
self.args = args;
|
|
16
|
+
self.logger = mockLogger;
|
|
17
|
+
self.kernel = {};
|
|
18
|
+
self.bootstrap = jest.fn().mockResolvedValue(undefined);
|
|
19
|
+
self.start = jest.fn().mockResolvedValue(undefined);
|
|
20
|
+
self.use = jest.fn();
|
|
21
|
+
self.getEntry = jest.fn().mockReturnValue({});
|
|
22
|
+
|
|
23
|
+
return self;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Add prototype methods for class inheritance compatibility
|
|
27
|
+
DummyKernel.prototype.bootstrap = jest.fn().mockResolvedValue(undefined);
|
|
28
|
+
DummyKernel.prototype.start = jest.fn().mockResolvedValue(undefined);
|
|
29
|
+
DummyKernel.prototype.use = jest.fn();
|
|
30
|
+
|
|
31
|
+
const proxy = new Proxy({}, {
|
|
32
|
+
get: function(target, prop) {
|
|
33
|
+
if (prop === '__esModule') {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Explicit exports
|
|
38
|
+
if (prop === 'createLogger') {
|
|
39
|
+
return () => mockLogger;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (prop === 'ObjectKernel' || prop === 'ObjectStack') {
|
|
43
|
+
return DummyKernel;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// For other exports, return a generic mock or DummyKernel if it looks like a class
|
|
47
|
+
if (typeof prop === 'string' && /^[A-Z]/.test(prop)) {
|
|
48
|
+
return DummyKernel;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return jest.fn();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
module.exports = proxy;
|