@cap-js-community/common 0.1.7 → 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cap-js-community/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "CAP Node.js Community Common",
|
|
5
5
|
"homepage": "https://cap.cloud.sap/",
|
|
6
6
|
"engines": {
|
|
@@ -44,26 +44,26 @@
|
|
|
44
44
|
"audit": "npm audit --only=prod"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@cap-js/sqlite": "^
|
|
48
|
-
"commander": "^
|
|
47
|
+
"@cap-js/sqlite": "^2.0.1",
|
|
48
|
+
"commander": "^14.0.0",
|
|
49
49
|
"redis": "^4.7.1",
|
|
50
50
|
"verror": "^1.10.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@cap-js-community/common": "./",
|
|
54
54
|
"@cap-js/cds-test": "^0.3.0",
|
|
55
|
-
"@sap/cds": "^
|
|
56
|
-
"@sap/cds-common-content": "^
|
|
57
|
-
"@sap/cds-dk": "^
|
|
58
|
-
"eslint": "9.
|
|
59
|
-
"eslint-config-prettier": "10.1.
|
|
60
|
-
"eslint-plugin-jest": "28.
|
|
61
|
-
"eslint-plugin-n": "^17.
|
|
55
|
+
"@sap/cds": "^9.0.2",
|
|
56
|
+
"@sap/cds-common-content": "^3.0.1",
|
|
57
|
+
"@sap/cds-dk": "^9.0.4",
|
|
58
|
+
"eslint": "9.28.0",
|
|
59
|
+
"eslint-config-prettier": "10.1.5",
|
|
60
|
+
"eslint-plugin-jest": "28.12.0",
|
|
61
|
+
"eslint-plugin-n": "^17.19.0",
|
|
62
62
|
"jest": "29.7.0",
|
|
63
63
|
"jest-html-reporters": "3.1.7",
|
|
64
64
|
"jest-junit": "16.0.0",
|
|
65
65
|
"prettier": "3.5.3",
|
|
66
|
-
"shelljs": "^0.
|
|
66
|
+
"shelljs": "^0.10.0"
|
|
67
67
|
},
|
|
68
68
|
"cds": {
|
|
69
69
|
"requires": {
|
|
@@ -490,7 +490,7 @@ class ReplicationCache {
|
|
|
490
490
|
search(query) {
|
|
491
491
|
let search = true;
|
|
492
492
|
if (query.SELECT.search?.length > 0) {
|
|
493
|
-
const ref = query.
|
|
493
|
+
const ref = query._target.name;
|
|
494
494
|
this.stats.search[ref] ??= 0;
|
|
495
495
|
this.stats.search[ref]++;
|
|
496
496
|
this.log.debug("Replication cache skipped for search", {
|
|
@@ -504,7 +504,7 @@ class ReplicationCache {
|
|
|
504
504
|
localized(query, refs) {
|
|
505
505
|
let localized = true;
|
|
506
506
|
if (query.SELECT.localized) {
|
|
507
|
-
const ref = query.
|
|
507
|
+
const ref = query._target.name;
|
|
508
508
|
this.stats.localized[ref] ??= 0;
|
|
509
509
|
this.stats.localized[ref]++;
|
|
510
510
|
this.log.debug("Replication cache not enabled for 'localized' without deploy feature", {
|
|
@@ -852,19 +852,20 @@ function fromRefs(model, query) {
|
|
|
852
852
|
return refs;
|
|
853
853
|
}, []);
|
|
854
854
|
}
|
|
855
|
-
if (query.
|
|
855
|
+
if (query._target) {
|
|
856
|
+
const target = model.definitions[query._target.name];
|
|
856
857
|
if (query.SELECT.orderBy) {
|
|
857
|
-
refs = refs.concat(expressionRefs(model,
|
|
858
|
+
refs = refs.concat(expressionRefs(model, target, query.SELECT.orderBy));
|
|
858
859
|
}
|
|
859
860
|
if (query.SELECT.columns) {
|
|
860
|
-
refs = refs.concat(expressionRefs(model,
|
|
861
|
-
refs = refs.concat(expandRefs(model,
|
|
861
|
+
refs = refs.concat(expressionRefs(model, target, query.SELECT.columns));
|
|
862
|
+
refs = refs.concat(expandRefs(model, target, query.SELECT.columns));
|
|
862
863
|
}
|
|
863
864
|
if (query.SELECT.where) {
|
|
864
|
-
refs = refs.concat(expressionRefs(model,
|
|
865
|
+
refs = refs.concat(expressionRefs(model, target, query.SELECT.where));
|
|
865
866
|
}
|
|
866
867
|
if (query.SELECT.having) {
|
|
867
|
-
refs = refs.concat(expressionRefs(model,
|
|
868
|
+
refs = refs.concat(expressionRefs(model, target, query.SELECT.having));
|
|
868
869
|
}
|
|
869
870
|
}
|
|
870
871
|
return refs;
|