@sap/cds-dk 7.1.1 → 7.3.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/bin/activate.js +2 -2
- package/bin/build.js +5 -2
- package/bin/compile/index.js +13 -5
- package/bin/env.js +0 -3
- package/bin/extend.js +25 -3
- package/bin/gen.js +27 -0
- package/bin/help.js +2 -1
- package/bin/import.js +7 -3
- package/bin/push.js +10 -6
- package/bin/watch.js +3 -4
- package/bin/watched.js +2 -3
- package/lib/bind/bindingUtil.js +1 -0
- package/lib/build/{buildTaskHandler.js → buildPlugin.js} +25 -30
- package/lib/build/buildTaskEngine.js +84 -89
- package/lib/build/buildTaskFactory.js +23 -44
- package/lib/build/buildTaskProvider.js +24 -19
- package/lib/build/buildTaskProviderFactory.js +176 -66
- package/lib/build/constants.js +6 -5
- package/lib/build/index.js +4 -3
- package/lib/build/provider/{buildTaskHandlerEdmx.js → edmxBuildPlugin.js} +6 -6
- package/lib/build/provider/{buildTaskHandlerFeatureToggles.js → featureToggleBuildPlugin.js} +3 -3
- package/lib/build/provider/fiori/index.js +5 -6
- package/lib/build/provider/hana/index.js +67 -36
- package/lib/build/provider/{buildTaskHandlerInternal.js → internalBuildPlugin.js} +11 -11
- package/lib/build/provider/{buildTaskProviderInternal.js → internalBuildTaskProvider.js} +42 -53
- package/lib/build/provider/java/index.js +24 -24
- package/lib/build/provider/mtx/index.js +4 -4
- package/lib/build/provider/mtx/resourcesTarBuilder.js +8 -8
- package/lib/build/provider/mtx-extension/index.js +17 -9
- package/lib/build/provider/mtx-sidecar/index.js +17 -11
- package/lib/build/provider/nodejs/index.js +63 -29
- package/lib/build/util.js +11 -19
- package/lib/client/auth_manager.js +6 -12
- package/lib/client/base_command.js +1 -1
- package/lib/client/download_legacy.js +48 -0
- package/lib/client/params.js +5 -0
- package/lib/client/push.js +41 -1
- package/lib/client/settings_manager.js +12 -3
- package/lib/compile/openapi/csdl2openapi.js +30 -21
- package/lib/compile/openapi/index.js +7 -3
- package/lib/env/schema.js +36 -0
- package/lib/env/schemas/cds-rc.json +101 -0
- package/lib/import/common.js +24 -11
- package/lib/import/importapi.js +2 -2
- package/lib/import/message.js +3 -1
- package/lib/import/odata/v4parser.js +23 -7
- package/lib/index.js +5 -0
- package/lib/init/constants.js +9 -12
- package/lib/init/index.js +86 -74
- package/lib/init/template/_merging/registry-mta.js +21 -12
- package/lib/init/template/approuter/files/mta.yaml.hbs +1 -1
- package/lib/init/template/approuter/index.js +3 -2
- package/lib/init/template/cf-manifest/files/services-manifest.yml.hbs +0 -5
- package/lib/init/template/cf-manifest/index.js +2 -2
- package/lib/init/template/connectivity/index.js +5 -4
- package/lib/init/template/destination/index.js +2 -5
- package/lib/init/template/h2/index.js +16 -0
- package/lib/init/template/hana/index.js +2 -3
- package/lib/init/template/helm/chart/values.root.schema.json +0 -5
- package/lib/init/template/helm/chart/values.schema.json +0 -4
- package/lib/init/template/helm/index.js +1 -1
- package/lib/init/template/html5-repo/index.js +27 -3
- package/lib/init/template/lint/index.js +3 -7
- package/lib/init/template/mta/index.js +9 -3
- package/lib/init/template/multitenancy/files/package.json.hbs +0 -3
- package/lib/init/template/multitenancy/index.js +2 -0
- package/lib/init/template/nodejs/index.js +3 -3
- package/lib/init/template/pipeline/index.js +2 -4
- package/lib/init/template/postgres/files/mta.yaml.hbs +27 -0
- package/lib/init/template/postgres/files/package.json.hbs +5 -0
- package/lib/init/template/postgres/index.js +52 -0
- package/lib/init/template/sample/index.js +5 -7
- package/lib/init/template/sqlite/index.js +8 -3
- package/lib/init/template/tiny-sample/index.js +16 -30
- package/lib/init/util/mvn.js +25 -1
- package/lib/init/util/projectReader.js +2 -7
- package/lib/init/util/template.js +7 -6
- package/lib/util/pruneAxiosErrors.js +22 -8
- package/lib/watch/node-watch.js +6 -1
- package/npm-shrinkwrap.json +2207 -384
- package/package.json +3 -3
- package/lib/init/template/auditlog/files/mta.yaml.hbs +0 -14
- package/lib/init/template/auditlog/files/package.json.hbs +0 -27
- package/lib/init/template/auditlog/index.js +0 -74
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Command line client and development toolkit for the SAP Cloud Application Programming Model",
|
|
5
5
|
"homepage": "https://cap.cloud.sap/",
|
|
6
6
|
"keywords": [
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"@sap/cds-foss": "^4.0.2",
|
|
21
21
|
"@sap/cds-mtxs": "^1.9.0",
|
|
22
22
|
"@sap/eslint-plugin-cds": "^2.6.0",
|
|
23
|
-
"
|
|
23
|
+
"@sap/hdi-deploy": "^4.8.0",
|
|
24
|
+
"axios": "^1",
|
|
24
25
|
"eslint": "^8",
|
|
25
26
|
"express": "^4.17.3",
|
|
26
27
|
"livereload-js": "^4.0.1",
|
|
27
|
-
"md5": "^2.3.0",
|
|
28
28
|
"mustache": "^4.0.1",
|
|
29
29
|
"node-watch": ">=0.7",
|
|
30
30
|
"pluralize": "^8.0.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
modules:
|
|
3
|
-
- name: {{appName}}-srv
|
|
4
|
-
type: {{language}}
|
|
5
|
-
path: {{& srvPath}}
|
|
6
|
-
requires:
|
|
7
|
-
- name: {{appName}}-auditlog
|
|
8
|
-
|
|
9
|
-
resources:
|
|
10
|
-
- name: {{appName}}-auditlog
|
|
11
|
-
type: org.cloudfoundry.managed-service
|
|
12
|
-
parameters:
|
|
13
|
-
service: auditlog-api
|
|
14
|
-
service-plan: default
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
{{#isNodejs}}
|
|
3
|
-
"dependencies": {
|
|
4
|
-
"@sap/audit-logging": "^5"
|
|
5
|
-
},
|
|
6
|
-
"cds": {
|
|
7
|
-
{{/isNodejs}}
|
|
8
|
-
"requires": {
|
|
9
|
-
{{#profile}}
|
|
10
|
-
"[{{profile}}]": {
|
|
11
|
-
{{/profile}}
|
|
12
|
-
{{#shortcut}}
|
|
13
|
-
"audit-log": "service"
|
|
14
|
-
{{/shortcut}}
|
|
15
|
-
{{^shortcut}}
|
|
16
|
-
"audit-log": {
|
|
17
|
-
"kind": "service"
|
|
18
|
-
}
|
|
19
|
-
{{/shortcut}}
|
|
20
|
-
{{#profile}}
|
|
21
|
-
}
|
|
22
|
-
{{/profile}}
|
|
23
|
-
}
|
|
24
|
-
{{#isNodejs}}
|
|
25
|
-
}
|
|
26
|
-
{{/isNodejs}}
|
|
27
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
const cds = require('../../../cds')
|
|
2
|
-
const { read } = cds.utils
|
|
3
|
-
const { join } = require('path')
|
|
4
|
-
const { readProject } = require('../../util/projectReader')
|
|
5
|
-
const { mergeJSON, mergeYAML } = require('../../util/merge')
|
|
6
|
-
const { parseMd5File, writeMd5File } = require('../../util/md5')
|
|
7
|
-
const { srvNode4, srvJava4, auditlog } = require('../_merging/registry-mta')
|
|
8
|
-
|
|
9
|
-
module.exports = class AuditlogTemplate extends require('../templateBase') {
|
|
10
|
-
|
|
11
|
-
static hasFacet(env) {
|
|
12
|
-
return env.requires?.['audit-log']
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
async run() {
|
|
16
|
-
const project = await readProject()
|
|
17
|
-
const { configFile } = project
|
|
18
|
-
project.shortcut = !(await read(configFile)).cds?.requires?.['audit-log']?.kind
|
|
19
|
-
await mergeJSON(configFile, join(__dirname, 'files', 'package.json.hbs'), project)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async runDependentMerging(context = {}) {
|
|
23
|
-
const project = await readProject()
|
|
24
|
-
const { isNodejs, hasMta, hasHelm, srvPath } = project
|
|
25
|
-
|
|
26
|
-
if (hasMta) {
|
|
27
|
-
const srv = (isNodejs ? srvNode4 : srvJava4)(srvPath)
|
|
28
|
-
await mergeYAML(
|
|
29
|
-
'mta.yaml',
|
|
30
|
-
join(__dirname, 'files', 'mta.yaml.hbs'),
|
|
31
|
-
project,
|
|
32
|
-
{
|
|
33
|
-
additions: [srv, auditlog],
|
|
34
|
-
relationships: [{
|
|
35
|
-
insert: [auditlog, 'name'],
|
|
36
|
-
into: [srv, 'requires', 'name']
|
|
37
|
-
}]
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (hasHelm) {
|
|
43
|
-
//in case facet is being added to the already exisiting charts folder
|
|
44
|
-
let isIndependentCommand = false
|
|
45
|
-
if(Object.keys(context).length == 0){
|
|
46
|
-
isIndependentCommand = true
|
|
47
|
-
context.oldTrackingData = context.newTrackingData = await parseMd5File(join('chart', '.cds-add-helm-files.md5'))
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
await mergeYAML(
|
|
51
|
-
join('chart', 'values.yaml'),
|
|
52
|
-
{
|
|
53
|
-
srv: { bindings: {
|
|
54
|
-
auditlog: { serviceInstanceName: 'auditlog' }
|
|
55
|
-
}},
|
|
56
|
-
auditlog: {
|
|
57
|
-
serviceOfferingName: 'auditlog-api',
|
|
58
|
-
servicePlanName: 'default'
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
// copy service instance chart if it is not present
|
|
64
|
-
const HelmTemplate = require(`../helm`);
|
|
65
|
-
const helmTemplate = new HelmTemplate(context.oldTrackingData, context.newTrackingData);
|
|
66
|
-
isIndependentCommand = isIndependentCommand | await helmTemplate.addSubChart('service-instance');
|
|
67
|
-
|
|
68
|
-
// add dependency entry in chart.yaml
|
|
69
|
-
await helmTemplate.addDependency('service-instance', 'auditlog');
|
|
70
|
-
|
|
71
|
-
if(isIndependentCommand) await writeMd5File(join('chart', '.cds-add-helm-files.md5'), context.newTrackingData)
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|