@sap/cds 7.0.3 → 7.1.1
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/CHANGELOG.md +54 -3
- package/_i18n/i18n_ar.properties +3 -0
- package/_i18n/i18n_cs.properties +4 -1
- package/_i18n/i18n_da.properties +3 -0
- package/_i18n/i18n_de.properties +3 -0
- package/_i18n/i18n_en.properties +3 -0
- package/_i18n/i18n_es.properties +3 -0
- package/_i18n/i18n_fi.properties +3 -0
- package/_i18n/i18n_fr.properties +3 -0
- package/_i18n/i18n_it.properties +3 -0
- package/_i18n/i18n_ja.properties +3 -0
- package/_i18n/i18n_ko.properties +3 -0
- package/_i18n/i18n_ms.properties +3 -0
- package/_i18n/i18n_nl.properties +3 -0
- package/_i18n/i18n_no.properties +3 -0
- package/_i18n/i18n_pl.properties +3 -0
- package/_i18n/i18n_pt.properties +3 -0
- package/_i18n/i18n_ro.properties +3 -0
- package/_i18n/i18n_ru.properties +3 -0
- package/_i18n/i18n_sv.properties +3 -0
- package/_i18n/i18n_th.properties +3 -0
- package/_i18n/i18n_zh_CN.properties +3 -0
- package/_i18n/i18n_zh_TW.properties +3 -0
- package/apis/core.d.ts +26 -30
- package/apis/cqn.d.ts +1 -0
- package/apis/ql.d.ts +2 -0
- package/apis/serve.d.ts +9 -0
- package/apis/services.d.ts +3 -2
- package/bin/serve.js +2 -2
- package/lib/compile/for/lean_drafts.js +21 -18
- package/lib/compile/to/srvinfo.js +1 -17
- package/lib/dbs/cds-deploy.js +11 -6
- package/lib/env/cds-env.js +3 -4
- package/lib/env/presets.js +14 -9
- package/lib/env/schemas/cds-package.json +3 -1
- package/lib/env/schemas/cds-rc.json +0 -4
- package/lib/linked/classes.js +112 -12
- package/lib/linked/entities.js +3 -0
- package/lib/ql/Whereable.js +1 -0
- package/lib/srv/cds-serve.js +2 -1
- package/lib/srv/protocols/_legacy.js +7 -6
- package/lib/srv/protocols/index.js +30 -72
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/read.js +13 -4
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/format/ResponseContentNegotiator.js +12 -0
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/serializer/SerializerFactory.js +3 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/utils/MetadataCache.js +1 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/metaInfo.js +1 -4
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/result.js +10 -4
- package/libx/_runtime/cds-services/services/utils/columns.js +8 -2
- package/libx/_runtime/cds-services/services/utils/differ.js +1 -1
- package/libx/_runtime/common/composition/data.js +49 -29
- package/libx/_runtime/common/composition/update.js +0 -1
- package/libx/_runtime/common/composition/utils.js +1 -1
- package/libx/_runtime/common/generic/crud.js +2 -2
- package/libx/_runtime/common/generic/input.js +18 -13
- package/libx/_runtime/common/utils/cqn2cqn4sql.js +6 -2
- package/libx/_runtime/common/utils/resolveView.js +115 -35
- package/libx/_runtime/common/utils/rewriteAsterisks.js +21 -0
- package/libx/_runtime/common/utils/search2cqn4sql.js +1 -1
- package/libx/_runtime/db/generic/rewrite.js +5 -4
- package/libx/_runtime/db/query/read.js +10 -9
- package/libx/_runtime/db/query/update.js +9 -18
- package/libx/_runtime/db/utils/deep.js +6 -5
- package/libx/_runtime/db/utils/localized.js +1 -1
- package/libx/_runtime/db/utils/normalizeTimeData.js +1 -1
- package/libx/_runtime/fiori/generic/activate.js +14 -19
- package/libx/_runtime/fiori/generic/edit.js +3 -6
- package/libx/_runtime/fiori/lean-draft.js +3 -2
- package/libx/_runtime/hana/localized.js +1 -1
- package/libx/_runtime/hana/search2cqn4sql.js +3 -1
- package/libx/_runtime/remote/utils/client.js +9 -5
- package/libx/_runtime/sqlite/localized.js +1 -1
- package/libx/odata/afterburner.js +5 -2
- package/libx/rest/middleware/operation.js +1 -1
- package/package.json +3 -3
- package/lib/srv/protocols/graphql.js +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,58 @@
|
|
|
4
4
|
- The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
5
5
|
- This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## Version 7.1.1 - 2023-08-01
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Lean draft: read actives via service on draft edit
|
|
12
|
+
- Resolve column name for `STREAM` CQN queries that point to views
|
|
13
|
+
- Only log the error in case of an unhandled rejection
|
|
14
|
+
|
|
15
|
+
## Version 7.1.0 - 2023-07-28
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Support for resolving of `STREAM` CQN queries that point to views
|
|
20
|
+
- Enable PDF export via GET to collection with accept header `appplication/pdf`.
|
|
21
|
+
Custom handler must return the following:
|
|
22
|
+
```
|
|
23
|
+
{
|
|
24
|
+
value: <instance of Readable>,
|
|
25
|
+
$mediaContentType: <String>, // > optional, defaults to: application/pdf
|
|
26
|
+
$mediaContentDispositionFilename: <String>, // > optional
|
|
27
|
+
$mediaContentDispositionType: <String> // > optional, defaults to 'attachment' if $mediaContentDispositionFilename is set
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
- Schema for `cds` entry in `package.json` now has a tooltip and default value
|
|
31
|
+
- `srv.endpoints`: Array containing the information for all endpoints at which the service is served.
|
|
32
|
+
Example:
|
|
33
|
+
```
|
|
34
|
+
[
|
|
35
|
+
{ kind: 'odata-v4', path: '/odata/v4/browse' },
|
|
36
|
+
{ kind: 'rest', path: '/rest/browse' }
|
|
37
|
+
]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Multiple TypeScript improvements
|
|
43
|
+
- Proper handling for `expand=*` for OData URL to CQN parser (`cds.env.features.odata_new_parser`)
|
|
44
|
+
- Fully qualified operation names are correctly resolved in rest adapter
|
|
45
|
+
- Log level for odata metadata cache was not handled correctly
|
|
46
|
+
- Protocol paths are normalized to always have a leading slash
|
|
47
|
+
- `@odata` shortcut for `odata-v4` protocol with custom configuration
|
|
48
|
+
- Default protocol is `odata-v4`, independent of the order in `cds.env.protocols`
|
|
49
|
+
- Data is not logged for GET and DELETE remote requests
|
|
50
|
+
- draft: deep update without change should not update the `modifiedAt` field
|
|
51
|
+
- Lean draft: do not propagate `@Capabilities.NavigationRestrictions.RestrictedProperties`
|
|
52
|
+
- Commit db transaction only once outbound streaming has ended
|
|
53
|
+
- Lean draft: deactivate legacy `drafts` getter
|
|
54
|
+
- Updated typings for srv.send
|
|
55
|
+
- `$search`: exclude calculated fields/expressions from default search in projection of projections
|
|
56
|
+
- Immutable properties are always removed from payload during UPDATE
|
|
57
|
+
- `serviceinfo.urlPath` contains the first endpoint of the service (cf. `srv.endpoints`), which is the legacy path if `cds.env.features.serve_on_root === true`
|
|
58
|
+
|
|
7
59
|
## Version 7.0.3 - 2023-07-19
|
|
8
60
|
|
|
9
61
|
### Fixed
|
|
@@ -74,19 +126,18 @@
|
|
|
74
126
|
- Support for multiline texts in `properties` files
|
|
75
127
|
- Error when reading auth protected entities with infix filter in expand
|
|
76
128
|
- Glitch in transaction handling in case of concurrent async before handlers
|
|
77
|
-
- Detection of feature toggles in single-tenant mode
|
|
78
129
|
|
|
79
130
|
### Removed
|
|
80
131
|
|
|
81
132
|
- Deprecated `req.run()` function, use `cds.run()` instead.
|
|
82
|
-
- Deprecated compat mode `cds.env.features.cds_tx_protection = false`
|
|
83
|
-
- Deprecated referential integrity checks at runtime
|
|
84
133
|
- Support for inofficial feature flag `cds.env.features.bigjs`
|
|
85
134
|
- Support for inofficial feature flag `cds.features.parameterized_numbers`
|
|
135
|
+
- Deprecated referential integrity checks at runtime
|
|
86
136
|
- Support for `cds-mtx`
|
|
87
137
|
- Support for Node 14
|
|
88
138
|
- Internal `req.getUriInfo()` and `req.getUrlObject()`
|
|
89
139
|
- `cds deploy --to hana` is now part of `@sap/cds-dk`.
|
|
140
|
+
- Deprecated compat mode `cds.env.features.cds_tx_protection = false`
|
|
90
141
|
- Beta `AuditLogService` and out-of-the-box audit logging. Use plugin `@cap-js/audit-logging` instead.
|
|
91
142
|
|
|
92
143
|
## Version 6.8.3 - 2023-06-13
|
package/_i18n/i18n_ar.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=\u0643\u0633\u0648\u0631 \u0648\u062D\u062F\u0627\u062A \u062B\u0627\u0646\u0648\u064A\u0629 \u0644\u0644\u0639\u0645\u0644\u0629
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\u0627\u0644\u062F\u0648\u0644\u0629/\u0627\u0644\u0645\u0646\u0637\u0642\u0629
|
|
54
57
|
|
package/_i18n/i18n_cs.properties
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
#----------------------------------------------------------------------------------------------------------------------
|
|
27
27
|
|
|
28
28
|
#XTIT: Created By (Answer to: "Which user has created a certain entity?")
|
|
29
|
-
CreatedBy=Vytvo\u0159il
|
|
29
|
+
CreatedBy=Vytvo\u0159il(a)
|
|
30
30
|
|
|
31
31
|
#XTIT: Created On (Answer to: "When has a certain entity been created?")
|
|
32
32
|
CreatedAt=Vytvo\u0159eno dne
|
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=K\u00F3d m\u011Bny zadan\u00FD dle ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Symbol m\u011Bny
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Zlomky pomocn\u00E9 jednotky m\u011Bny
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=St\u00E1t/region
|
|
54
57
|
|
package/_i18n/i18n_da.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Valutakode som angivet af ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Valutasymbol
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Valutahj\u00E6lpeenhedsandele
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Land/region
|
|
54
57
|
|
package/_i18n/i18n_de.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=W\u00E4hrungscode gem\u00E4\u00DF ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=W\u00E4hrungssymbol
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Bruchteile W\u00E4hrungsuntereinheit
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Land/Region
|
|
54
57
|
|
package/_i18n/i18n_en.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Currency code as specified by ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Currency Symbol
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Currency Minor Unit Fractions
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Country/Region
|
|
54
57
|
|
package/_i18n/i18n_es.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=C\u00F3digo de moneda seg\u00FAn especificado por ISO 4
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=S\u00EDmbolo de moneda
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Fracciones unidad secundaria de moneda
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Pa\u00EDs/Regi\u00F3n
|
|
54
57
|
|
package/_i18n/i18n_fi.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=ISO 4217:n mukainen valuuttakoodi
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Valuuttatunnus
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Valuutan pienen yksik\u00F6n murto-osat
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Maa/alue
|
|
54
57
|
|
package/_i18n/i18n_fr.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Code de devise tel qu'indiqu\u00E9 par ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Symbole de devise
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Fractions de l'unit\u00E9 secondaire de la devise
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Pays/R\u00E9gion
|
|
54
57
|
|
package/_i18n/i18n_it.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Codice divisa come indicato da ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Simbolo divisa
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Frazioni suddivisione unit\u00E0 monetaria
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Paese/regione
|
|
54
57
|
|
package/_i18n/i18n_ja.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=ISO 4217 \u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u30
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=\u901A\u8CA8\u30B7\u30F3\u30DC\u30EB
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=\u901A\u8CA8\u88DC\u52A9\u5358\u4F4D\u306E\u5206\u6570
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\u56FD/\u5730\u57DF
|
|
54
57
|
|
package/_i18n/i18n_ko.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=ISO 4217\uC5D0\uC11C \uC9C0\uC815\uD55C \uD1B5\uD654 \u
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=\uD1B5\uD654 \uAE30\uD638
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=\uD1B5\uD654 \uBCF4\uC870 \uB2E8\uC704 \uC18C\uC218 \uC790\uB9AC
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\uAD6D\uAC00/\uC9C0\uC5ED
|
|
54
57
|
|
package/_i18n/i18n_ms.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Kod mata wang seperti yang dinyatakan dalam ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Simbol Mata Wang
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Pecahan Unit Kecil Mata Wang
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Negara/Wilayah
|
|
54
57
|
|
package/_i18n/i18n_nl.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Valutacode zoals gespecificeerd door ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Valutasymbool
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Breuken kleinste eenheid valuta
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Land/regio
|
|
54
57
|
|
package/_i18n/i18n_no.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Valutakode som definert i ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Valutasymbol
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Deler for valutaunderenhet
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Land/region
|
|
54
57
|
|
package/_i18n/i18n_pl.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Kod waluty okre\u015Blony zgodnie z norm\u0105 ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Symbol waluty
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Warto\u015Bci u\u0142amkowe jednostki pomocniczej waluty
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Kraj/region
|
|
54
57
|
|
package/_i18n/i18n_pt.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=C\u00F3digo de moeda como especificado pelo ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=S\u00EDmbolo da moeda
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Fra\u00E7\u00F5es de unidade auxiliar de moeda
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Pa\u00EDs/regi\u00E3o
|
|
54
57
|
|
package/_i18n/i18n_ro.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Cod moned\u0103 a\u0219a cum este specificat de ISO 421
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Simbol moned\u0103
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Frac\u021Bii subunitate de moned\u0103
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\u021Aar\u0103/regiune
|
|
54
57
|
|
package/_i18n/i18n_ru.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=\u041A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=\u0421\u0438\u043C\u0432\u043E\u043B \u0432\u0430\u043B\u044E\u0442\u044B
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=\u0414\u043E\u043B\u0438 \u0432\u0441\u043F\u043E\u043C\u043E\u0433\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0439 \u0432\u0430\u043B\u044E\u0442\u043D\u043E\u0439 \u0435\u0434\u0438\u043D\u0438\u0446\u044B
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\u0421\u0442\u0440\u0430\u043D\u0430/\u0440\u0435\u0433\u0438\u043E\u043D
|
|
54
57
|
|
package/_i18n/i18n_sv.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=Valutakod enligt ISO 4217
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=Valutasymbol
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=Antal mindre enheter f\u00F6r valuta
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=Land/region
|
|
54
57
|
|
package/_i18n/i18n_th.properties
CHANGED
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=\u0E2A\u0E31\u0E0D\u0E25\u0E31\u0E01\u0E29\u0E13\u0E4C\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=\u0E40\u0E28\u0E29\u0E2A\u0E48\u0E27\u0E19\u0E2B\u0E19\u0E48\u0E27\u0E22\u0E23\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28/\u0E20\u0E39\u0E21\u0E34\u0E20\u0E32\u0E04
|
|
54
57
|
|
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=ISO 4217 \u6307\u5B9A\u7684\u8D27\u5E01\u4EE3\u7801
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=\u8D27\u5E01\u7B26\u53F7
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=\u8D27\u5E01\u6B21\u8981\u5355\u4F4D\u90E8\u5206
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\u56FD\u5BB6/\u5730\u533A
|
|
54
57
|
|
|
@@ -49,6 +49,9 @@ CurrencyCode.Description=\u5DF2\u6309 ISO 4217 \u6307\u5B9A\u516C\u53F8\u4EE3\u7
|
|
|
49
49
|
#XTIT: Currency Symbol
|
|
50
50
|
CurrencySymbol=\u5E63\u5225\u7B26\u865F
|
|
51
51
|
|
|
52
|
+
#XTIT: Currency Minor Unit Fractions (Answer to: "How many fractions has a currency's minor unit?", e.g. "0" or "2")
|
|
53
|
+
CurrencyMinorUnit=\u5E63\u5225\u6B21\u8981\u55AE\u4F4D\u5206\u6578
|
|
54
|
+
|
|
52
55
|
#XTIT: Country/Region
|
|
53
56
|
Country=\u570B\u5BB6/\u5730\u5340
|
|
54
57
|
|
package/apis/core.d.ts
CHANGED
|
@@ -2,8 +2,31 @@
|
|
|
2
2
|
import { ReflectedModel, LinkedModel, LinkedDefinition } from './reflect'
|
|
3
3
|
import { CSN as csn, Definition } from './csn'
|
|
4
4
|
|
|
5
|
+
type UserInput = string | { id: string; attr: Record<string, string>; roles: Record<string, string> } | User
|
|
5
6
|
|
|
6
|
-
export
|
|
7
|
+
export class User {
|
|
8
|
+
constructor(obj?: UserInput)
|
|
9
|
+
id: string
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use https://cap.cloud.sap/docs/node.js/events#locale instead
|
|
12
|
+
*/
|
|
13
|
+
locale: string
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use https://cap.cloud.sap/docs/node.js/events#tenant instead
|
|
16
|
+
*/
|
|
17
|
+
tenant: string | undefined
|
|
18
|
+
attr: Record<string, string>
|
|
19
|
+
roles: Record<string, string>
|
|
20
|
+
static Privileged: typeof Privileged
|
|
21
|
+
is(role: string): boolean
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Subclass for executing code with superuser privileges.
|
|
25
|
+
*/
|
|
26
|
+
declare class Privileged extends User {
|
|
27
|
+
constructor()
|
|
28
|
+
is(): boolean
|
|
29
|
+
}
|
|
7
30
|
|
|
8
31
|
declare class cds {
|
|
9
32
|
/**
|
|
@@ -22,7 +45,7 @@ declare class cds {
|
|
|
22
45
|
* Represents the user in a given context.
|
|
23
46
|
* @see [capire docs](https://cap.cloud.sap/docs/node.js/authentication#cds-user)
|
|
24
47
|
*/
|
|
25
|
-
User: typeof
|
|
48
|
+
User: typeof User
|
|
26
49
|
|
|
27
50
|
// infer (query : cqn, model : csn) : LinkedDefinition
|
|
28
51
|
|
|
@@ -105,31 +128,4 @@ declare class cds {
|
|
|
105
128
|
lazified: <T>(target: T) => T
|
|
106
129
|
}
|
|
107
130
|
// & typeof import ('../lib/index')
|
|
108
|
-
|
|
109
|
-
declare namespace cds {
|
|
110
|
-
type UserInput = string | { id: string; attr: Record<string, string>; roles: Record<string, string> } | User
|
|
111
|
-
|
|
112
|
-
export class User {
|
|
113
|
-
constructor(obj?: UserInput)
|
|
114
|
-
id: string
|
|
115
|
-
/**
|
|
116
|
-
* @deprecated Use https://cap.cloud.sap/docs/node.js/events#locale instead
|
|
117
|
-
*/
|
|
118
|
-
locale: string
|
|
119
|
-
/**
|
|
120
|
-
* @deprecated Use https://cap.cloud.sap/docs/node.js/events#tenant instead
|
|
121
|
-
*/
|
|
122
|
-
tenant: string | undefined
|
|
123
|
-
attr: Record<string, string>
|
|
124
|
-
roles: Record<string, string>
|
|
125
|
-
static Privileged: typeof Privileged
|
|
126
|
-
is(role: string): boolean
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Subclass for executing code with superuser privileges.
|
|
130
|
-
*/
|
|
131
|
-
class Privileged extends User {
|
|
132
|
-
constructor()
|
|
133
|
-
is(): boolean
|
|
134
|
-
}
|
|
135
|
-
}
|
|
131
|
+
export = cds
|
package/apis/cqn.d.ts
CHANGED
package/apis/ql.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Definition } from "./csn"
|
|
|
2
2
|
import * as CQN from "./cqn"
|
|
3
3
|
import { Constructable, ArrayConstructable, SingularType } from "./internal/inference"
|
|
4
4
|
|
|
5
|
+
export type CQNQuery = CQN.CQNQuery
|
|
5
6
|
export type Query = CQN.Query
|
|
6
7
|
|
|
7
8
|
export class ConstructedQuery {
|
|
@@ -239,6 +240,7 @@ export class INSERT<T> extends ConstructedQuery {
|
|
|
239
240
|
columns (...col: string[]) : this
|
|
240
241
|
values (... val: any[]) : this
|
|
241
242
|
rows (... row: any[]) : this
|
|
243
|
+
as (select: SELECT<T>): this
|
|
242
244
|
INSERT : CQN.INSERT["INSERT"]
|
|
243
245
|
}
|
|
244
246
|
|
package/apis/serve.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ declare class cds_serve {
|
|
|
36
36
|
*/
|
|
37
37
|
server: cds_server
|
|
38
38
|
|
|
39
|
+
|
|
40
|
+
|
|
39
41
|
/**
|
|
40
42
|
* Emitted at the very beginning of the bootsrapping process, when the
|
|
41
43
|
* express application has been constructed but no middlewares or routes
|
|
@@ -63,6 +65,13 @@ declare class cds_serve {
|
|
|
63
65
|
on (event : 'listening', listener : (args : { server: http.Server, url:string }) => void) : this
|
|
64
66
|
once (event : 'listening', listener : (args : { server: http.Server, url:string }) => void) : this
|
|
65
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Emitted by the default, built-in `server.js` when the http server
|
|
70
|
+
* is shutdown.
|
|
71
|
+
*/
|
|
72
|
+
on (event : 'shutdown', listener : () => void) : this
|
|
73
|
+
once (event : 'shutdown', listener : () => void) : this
|
|
74
|
+
|
|
66
75
|
/**
|
|
67
76
|
* Dictionary of all services constructed and/or connected.
|
|
68
77
|
*/
|
package/apis/services.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SELECT, INSERT, UPDATE, DELETE, Query, ConstructedQuery, UPSERT } from './ql'
|
|
1
|
+
import { SELECT, INSERT, UPDATE, DELETE, CQNQuery, Query, ConstructedQuery, UPSERT } from './ql'
|
|
2
2
|
import { Awaitable } from './ql'
|
|
3
3
|
import { ArrayConstructable, Constructable } from './internal/inference'
|
|
4
4
|
import { LinkedModel, Definition, Definitions } from './reflect'
|
|
@@ -180,6 +180,7 @@ export class Service extends QueryAPI {
|
|
|
180
180
|
<T = any>(details: { event: Events; data?: object; headers?: object }): Promise<T>
|
|
181
181
|
<T = any>(details: { query: ConstructedQuery; data?: object; headers?: object }): Promise<T>
|
|
182
182
|
<T = any>(details: { method: Event; path: string; data?: object; headers?: object }): Promise<T>
|
|
183
|
+
<T = any>(details: { event: Event; entity: Definition | string; data?: object; params?: object }): Promise<T>
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
/**
|
|
@@ -389,7 +390,7 @@ interface Request extends EventMessage {
|
|
|
389
390
|
* @see https://cap.cloud.sap/docs/node.js/events#req-entity
|
|
390
391
|
*/
|
|
391
392
|
entity: string
|
|
392
|
-
query:
|
|
393
|
+
query: CQNQuery
|
|
393
394
|
subject: ref
|
|
394
395
|
|
|
395
396
|
reply(results: any): void
|
package/bin/serve.js
CHANGED
|
@@ -206,8 +206,8 @@ async function serve (all=[], o={}) {
|
|
|
206
206
|
|
|
207
207
|
const LOG = cds.log('cli|server')
|
|
208
208
|
cds.shutdown = _shutdown //> for programmatic invocation
|
|
209
|
-
process.on('unhandledRejection',
|
|
210
|
-
process.on('uncaughtException',
|
|
209
|
+
process.on('unhandledRejection', e => _shutdown (e, cds.log('cds').error('❗️Uncaught',e)))
|
|
210
|
+
process.on('uncaughtException', e => _shutdown (e, cds.log('cds').error('❗️Uncaught',e)))
|
|
211
211
|
process.on('SIGINT', cds.watched ? _shutdown : (s,n)=>_shutdown(s,n,console.log())) //> newline after ^C
|
|
212
212
|
process.on('SIGHUP', _shutdown)
|
|
213
213
|
process.on('SIGHUP2', _shutdown)
|
|
@@ -33,24 +33,25 @@ module.exports = function cds_compile_for_lean_drafts(csn) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const { Draft } = cds.linked(`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`).definitions
|
|
36
|
+
entity ActiveEntity { key ID: UUID; }
|
|
37
|
+
entity Draft {
|
|
38
|
+
virtual IsActiveEntity : Boolean; // REVISIT: these are calculated fields, aren't they?
|
|
39
|
+
virtual HasDraftEntity : Boolean; // REVISIT: these are calculated fields, aren't they?
|
|
40
|
+
HasActiveEntity : Boolean; // This should be written !!!
|
|
41
|
+
DraftAdministrativeData : Association to DRAFT.DraftAdministrativeData;
|
|
42
|
+
DraftAdministrativeData_DraftUUID : UUID;
|
|
43
|
+
// SiblingEntity : Association to ActiveEntity; // REVISIT: Why didn't we use a managed assoc here?
|
|
44
|
+
}
|
|
45
|
+
entity DRAFT.DraftAdministrativeData {
|
|
46
|
+
key DraftUUID : UUID;
|
|
47
|
+
LastChangedByUser : String(256); LastChangeDateTime : Timestamp;
|
|
48
|
+
CreatedByUser : String(256); CreationDateTime : Timestamp;
|
|
49
|
+
InProcessByUser : String(256);
|
|
50
|
+
DraftIsCreatedByMe : Boolean; // REVISIT: these are calculated fields, aren't they?
|
|
51
|
+
DraftIsProcessedByMe : Boolean; // REVISIT: these are calculated fields, aren't they?
|
|
52
|
+
}
|
|
53
|
+
`).definitions
|
|
54
|
+
|
|
54
55
|
function addDraftEntity(active, model) {
|
|
55
56
|
const _draftEntity = active.name + '.drafts'
|
|
56
57
|
const d = model.definitions[_draftEntity]
|
|
@@ -75,6 +76,7 @@ module.exports = function cds_compile_for_lean_drafts(csn) {
|
|
|
75
76
|
if ('@Capabilities.DeleteRestrictions.Deletable' in draft) draft['@Capabilities.DeleteRestrictions.Deletable'] = undefined
|
|
76
77
|
if ('@Capabilities.InsertRestrictions.Insertable' in draft) draft['@Capabilities.InsertRestrictions.Insertable'] = undefined
|
|
77
78
|
if ('@Capabilities.UpdateRestrictions.Updatable' in draft) draft['@Capabilities.UpdateRestrictions.Updatable'] = undefined
|
|
79
|
+
if ('@Capabilities.NavigationRestrictions.RestrictedProperties' in draft) draft['@Capabilities.NavigationRestrictions.RestrictedProperties'] = undefined
|
|
78
80
|
|
|
79
81
|
// Recursively add drafts for compositions
|
|
80
82
|
for (const each in draft.elements) {
|
|
@@ -104,6 +106,7 @@ module.exports = function cds_compile_for_lean_drafts(csn) {
|
|
|
104
106
|
}
|
|
105
107
|
return draft
|
|
106
108
|
}
|
|
109
|
+
|
|
107
110
|
for (const name in csn.definitions) {
|
|
108
111
|
const def = csn.definitions[name]
|
|
109
112
|
if (!_isDraft(def) || def['@cds.external']) continue
|
|
@@ -35,31 +35,15 @@ module.exports = (model, options={}) => {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
function _makeNode(service) {
|
|
38
|
-
const path = _effectiveNodePath(service)
|
|
39
38
|
return {
|
|
40
39
|
name: service.name,
|
|
41
|
-
urlPath: _url4 (
|
|
40
|
+
urlPath: _url4 (cds.service.path4(service)),
|
|
42
41
|
destination: 'srv-api', // the name to register in xs-app.json
|
|
43
42
|
runtime: 'Node.js',
|
|
44
43
|
location: service.$location
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
// TODO use a function from cds.service... instead
|
|
49
|
-
function _effectiveNodePath(service) {
|
|
50
|
-
if (service['@path']?.[0] === '/') { // absolute path given
|
|
51
|
-
return service['@path']
|
|
52
|
-
}
|
|
53
|
-
const { ProtocolAdapter } = cds.service.protocols
|
|
54
|
-
const prots = ProtocolAdapter.protocols4(service)
|
|
55
|
-
const prot = prots.find(p => p.kind.startsWith('odata')) || prots[0] // prefer odata for compat. reasons
|
|
56
|
-
if (prot.path && prot.path.startsWith('/')) {
|
|
57
|
-
return prot.path
|
|
58
|
-
}
|
|
59
|
-
const rootPath = cds.env.requires.middlewares ? ProtocolAdapter.protocols[prot.kind]?.path || '' : ''
|
|
60
|
-
return join(rootPath, prot.path || cds.service.path4(service))
|
|
61
|
-
}
|
|
62
|
-
|
|
63
47
|
// the URL path that is *likely* effective at runtime
|
|
64
48
|
function _url4 (p) {
|
|
65
49
|
p = p.replace(/\\/g, '/') // handle Windows
|
package/lib/dbs/cds-deploy.js
CHANGED
|
@@ -102,13 +102,18 @@ exports.create = async function cds_deploy_create (db, csn=db.model, o) {
|
|
|
102
102
|
creas = cds.compile.to.sql(csn, o)
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
if (!drops)
|
|
106
|
-
drops =
|
|
107
|
-
|
|
105
|
+
if (!drops) {
|
|
106
|
+
drops = [];
|
|
107
|
+
creas.forEach(each => {
|
|
108
|
+
// For postgres, we add constraints via "ALTER TABLE" - so our regex might not match.
|
|
108
109
|
let [, kind, entity] = each.match(/^CREATE (TABLE|VIEW) ("[^"]+"|[^\s(]+)/im) || []
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
if(kind && entity)
|
|
111
|
+
drops.push(`DROP ${kind} IF EXISTS ${entity};`);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
drops.reverse()
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
|
|
113
118
|
if (!drops.length && !creas.length) return !o.dry
|
|
114
119
|
|
package/lib/env/cds-env.js
CHANGED
|
@@ -73,10 +73,7 @@ class Config {
|
|
|
73
73
|
// 5. link dependent services
|
|
74
74
|
this._link_required_services()
|
|
75
75
|
|
|
76
|
-
// 6.
|
|
77
|
-
this._add_cloud_service_bindings(process.env)
|
|
78
|
-
|
|
79
|
-
// 7. Add compatibility and correlations for mtx
|
|
76
|
+
// 6. Add compatibility and correlations for mtx
|
|
80
77
|
const db = this.requires?.db
|
|
81
78
|
if (this.requires?.db) {
|
|
82
79
|
if (this.requires.multitenancy !== undefined)
|
|
@@ -86,6 +83,8 @@ class Config {
|
|
|
86
83
|
}
|
|
87
84
|
if (this.requires?.multitenancy && this.requires.db?.kind === 'hana' && !this.requires.db.vcap) Object.assign(this.requires.db, { vcap: { label: 'service-manager' } })
|
|
88
85
|
|
|
86
|
+
// 7. complete service configurations from cloud service bindings
|
|
87
|
+
this._add_cloud_service_bindings(process.env)
|
|
89
88
|
|
|
90
89
|
// 8. apply presets
|
|
91
90
|
presets (this)
|