@sap/cds-dk 7.6.1 → 7.7.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.
Files changed (49) hide show
  1. package/bin/cds.js +1 -1
  2. package/bin/version.js +21 -20
  3. package/bin/watch.js +6 -0
  4. package/lib/build/buildTaskEngine.js +6 -4
  5. package/lib/build/buildTaskProviderFactory.js +5 -0
  6. package/lib/build/provider/edmxBuildPlugin.js +1 -1
  7. package/lib/build/provider/internalBuildTaskProvider.js +12 -10
  8. package/lib/build/provider/mtx/index.js +2 -2
  9. package/lib/build/provider/mtx/resourcesTarBuilder.js +1 -1
  10. package/lib/build/provider/mtx-extension/extensionCompilation.js +50 -0
  11. package/lib/build/provider/mtx-extension/index.js +70 -50
  12. package/lib/build/provider/mtx-sidecar/index.js +3 -3
  13. package/lib/build/util.js +9 -4
  14. package/lib/env/schema.js +1 -0
  15. package/lib/env/schemas/cds-rc.js +54 -1
  16. package/lib/import/asyncapi/parserContext.js +6 -0
  17. package/lib/init/add.js +2 -0
  18. package/lib/init/constants.js +2 -2
  19. package/lib/init/index.js +4 -8
  20. package/lib/init/merge.js +31 -13
  21. package/lib/init/projectReader.js +9 -1
  22. package/lib/init/registries/mta.js +19 -1
  23. package/lib/init/template/approuter/files/mta.yaml.hbs +1 -1
  24. package/lib/init/template/approuter/index.js +5 -5
  25. package/lib/init/template/connectivity/index.js +3 -4
  26. package/lib/init/template/helm/files/content-deployment/Chart.yaml +1 -1
  27. package/lib/init/template/helm/files/content-deployment/templates/job.yaml +3 -0
  28. package/lib/init/template/helm/files/content-deployment/values.schema.json +13 -1
  29. package/lib/init/template/helm/files/content-deployment/values.yaml +1 -1
  30. package/lib/init/template/helm/files/web-application/Chart.yaml +1 -1
  31. package/lib/init/template/helm/files/web-application/templates/deployment.yaml +1 -0
  32. package/lib/init/template/helm/files/web-application/templates/service.yaml +4 -0
  33. package/lib/init/template/helm/files/web-application/values.schema.json +16 -0
  34. package/lib/init/template/helm/files/web-application/values.yaml +7 -1
  35. package/lib/init/template/html5-repo/files/app-package.json.hbs +16 -0
  36. package/lib/init/template/html5-repo/files/mta.yaml.hbs +83 -0
  37. package/lib/init/template/html5-repo/files/package.json.hbs +17 -0
  38. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +33 -0
  39. package/lib/init/template/html5-repo/files/xs-app.json.hbs +19 -0
  40. package/lib/init/template/html5-repo/index.js +56 -12
  41. package/lib/init/template/mta/files/mta.yaml.hbs +1 -0
  42. package/lib/init/template/mta/index.js +5 -0
  43. package/lib/init/template/nodejs/files/.vscode/extensions.json +1 -2
  44. package/lib/init/template/nodejs/files/README.md +1 -1
  45. package/lib/init/template/sample/files/app/index.html +8 -6
  46. package/lib/init/template/sample/index.js +12 -2
  47. package/lib/util/cf.js +1 -0
  48. package/npm-shrinkwrap.json +31 -29
  49. package/package.json +1 -1
@@ -9,8 +9,7 @@
9
9
  "esbenp.prettier-vscode",
10
10
  "mechatroner.rainbow-csv",
11
11
  "qwtel.sqlite-viewer",
12
- "humao.rest-client",
13
- "sdras.night-owl"
12
+ "humao.rest-client"
14
13
  ],
15
14
  // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
16
15
  "unwantedRecommendations": [
@@ -15,7 +15,7 @@ File or Folder | Purpose
15
15
 
16
16
  ## Next Steps
17
17
 
18
- - Open a new terminal and run `cds watch`
18
+ - Open a new terminal and run `cds watch`
19
19
  - (in VS Code simply choose _**Terminal** > Run Task > cds watch_)
20
20
  - Start adding content, for example, a [db/schema.cds](db/schema.cds).
21
21
 
@@ -15,12 +15,14 @@
15
15
  </script>
16
16
 
17
17
  <script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
18
- <script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
19
- data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
20
- data-sap-ui-compatVersion="edge"
21
- data-sap-ui-theme="sap_horizon"
22
- data-sap-ui-frameOptions="allow"
23
- ></script>
18
+ <script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
19
+ data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
20
+ data-sap-ui-compatVersion="edge"
21
+ data-sap-ui-async="true"
22
+ data-sap-ui-preload="async"
23
+ data-sap-ui-theme="sap_horizon"
24
+ data-sap-ui-frameOptions="allow"
25
+ ></script>
24
26
  <script>
25
27
  sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"))
26
28
  </script>
@@ -1,5 +1,5 @@
1
1
  const { join } = require('path')
2
- const cds = require('../../../cds'), { exists, copy } = cds.utils
2
+ const cds = require('../../../cds'), { exists, read, write, copy } = cds.utils
3
3
  const { env4, readProject } = require('../../projectReader')
4
4
 
5
5
  module.exports = class SampleTemplate extends require('../../plugin') {
@@ -13,11 +13,21 @@ module.exports = class SampleTemplate extends require('../../plugin') {
13
13
  async run() {
14
14
  const { db, srv, app } = env4('production').folders
15
15
  const language = exists('pom.xml') ? 'java' : 'nodejs'
16
+
16
17
  await Promise.all([
17
18
  copy(join(__dirname, 'files', 'db')).to(db),
18
- copy(join(__dirname, 'files', 'app')).to(app),
19
19
  copy(join(__dirname, 'files', 'srv')).to(srv),
20
20
  copy(join(__dirname, 'files', language)).to(srv)
21
21
  ])
22
+
23
+ await copy(join(__dirname, 'files', 'app')).to(app)
24
+ const { appName, appPath, appUIPaths } = readProject()
25
+
26
+ // manifest.json must be unique
27
+ await Promise.all(appUIPaths.map(async p => {
28
+ const manifest = await read(join(appPath, p, 'webapp/manifest.json'))
29
+ manifest['sap.app'].id = appName + '.' + p
30
+ await write(join(appPath, p, 'webapp/manifest.json'), manifest, { spaces: 2 })
31
+ }))
22
32
  }
23
33
  }
package/lib/util/cf.js CHANGED
@@ -192,6 +192,7 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
192
192
  async getServices(app) {
193
193
  const { spaceGuid: space_guids, orgGuid: organization_guids } = await this.getCfSpaceInfo();
194
194
  const apps = await this._cfRequest('/v3/apps', { space_guids, organization_guids, names: app });
195
+ if (apps.resources.length < 1) throw `Cannot find app with name '${app}'`
195
196
  const guid = apps.resources[0].guid;
196
197
  const env = await this._cfRequest('/v3/apps/'+guid+'/env', { space_guids, organization_guids, names: app });
197
198
  return Object.values(env.system_env_json.VCAP_SERVICES).flat();
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.6.1",
3
+ "version": "7.7.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "7.6.1",
9
+ "version": "7.7.1",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@sap/cds": "^7",
@@ -88,7 +88,7 @@
88
88
  }
89
89
  },
90
90
  "node_modules/@eslint/js": {
91
- "version": "8.56.0",
91
+ "version": "8.57.0",
92
92
  "license": "MIT",
93
93
  "engines": {
94
94
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -177,7 +177,7 @@
177
177
  }
178
178
  },
179
179
  "node_modules/@sap/cds": {
180
- "version": "7.6.3",
180
+ "version": "7.7.0",
181
181
  "license": "SEE LICENSE IN LICENSE",
182
182
  "dependencies": {
183
183
  "@cap-js/cds-types": "<1",
@@ -194,7 +194,7 @@
194
194
  }
195
195
  },
196
196
  "node_modules/@sap/cds-compiler": {
197
- "version": "4.6.2",
197
+ "version": "4.7.6",
198
198
  "license": "SEE LICENSE IN LICENSE",
199
199
  "dependencies": {
200
200
  "antlr4": "4.9.3"
@@ -209,10 +209,10 @@
209
209
  }
210
210
  },
211
211
  "node_modules/@sap/cds-fiori": {
212
- "version": "1.2.2",
212
+ "version": "1.2.3",
213
213
  "license": "SEE LICENSE IN LICENSE",
214
214
  "peerDependencies": {
215
- "@sap/cds": ">=7",
215
+ "@sap/cds": ">=7.1",
216
216
  "express": ">=4"
217
217
  }
218
218
  },
@@ -230,7 +230,7 @@
230
230
  }
231
231
  },
232
232
  "node_modules/@sap/cds-mtxs": {
233
- "version": "1.15.0",
233
+ "version": "1.16.0",
234
234
  "license": "SEE LICENSE IN LICENSE",
235
235
  "dependencies": {
236
236
  "@sap/hdi-deploy": "^4",
@@ -750,11 +750,11 @@
750
750
  }
751
751
  },
752
752
  "node_modules/body-parser": {
753
- "version": "1.20.1",
753
+ "version": "1.20.2",
754
754
  "license": "MIT",
755
755
  "dependencies": {
756
756
  "bytes": "3.1.2",
757
- "content-type": "~1.0.4",
757
+ "content-type": "~1.0.5",
758
758
  "debug": "2.6.9",
759
759
  "depd": "2.0.0",
760
760
  "destroy": "1.2.0",
@@ -762,7 +762,7 @@
762
762
  "iconv-lite": "0.4.24",
763
763
  "on-finished": "2.4.1",
764
764
  "qs": "6.11.0",
765
- "raw-body": "2.5.1",
765
+ "raw-body": "2.5.2",
766
766
  "type-is": "~1.6.18",
767
767
  "unpipe": "1.0.0"
768
768
  },
@@ -1052,13 +1052,12 @@
1052
1052
  "license": "MIT"
1053
1053
  },
1054
1054
  "node_modules/define-data-property": {
1055
- "version": "1.1.3",
1055
+ "version": "1.1.4",
1056
1056
  "license": "MIT",
1057
1057
  "dependencies": {
1058
+ "es-define-property": "^1.0.0",
1058
1059
  "es-errors": "^1.3.0",
1059
- "get-intrinsic": "^1.2.4",
1060
- "gopd": "^1.0.1",
1061
- "has-property-descriptors": "^1.0.1"
1060
+ "gopd": "^1.0.1"
1062
1061
  },
1063
1062
  "engines": {
1064
1063
  "node": ">= 0.4"
@@ -1200,14 +1199,14 @@
1200
1199
  }
1201
1200
  },
1202
1201
  "node_modules/eslint": {
1203
- "version": "8.56.0",
1202
+ "version": "8.57.0",
1204
1203
  "license": "MIT",
1205
1204
  "dependencies": {
1206
1205
  "@eslint-community/eslint-utils": "^4.2.0",
1207
1206
  "@eslint-community/regexpp": "^4.6.1",
1208
1207
  "@eslint/eslintrc": "^2.1.4",
1209
- "@eslint/js": "8.56.0",
1210
- "@humanwhocodes/config-array": "^0.11.13",
1208
+ "@eslint/js": "8.57.0",
1209
+ "@humanwhocodes/config-array": "^0.11.14",
1211
1210
  "@humanwhocodes/module-importer": "^1.0.1",
1212
1211
  "@nodelib/fs.walk": "^1.2.8",
1213
1212
  "@ungap/structured-clone": "^1.2.0",
@@ -1341,12 +1340,12 @@
1341
1340
  }
1342
1341
  },
1343
1342
  "node_modules/express": {
1344
- "version": "4.18.2",
1343
+ "version": "4.18.3",
1345
1344
  "license": "MIT",
1346
1345
  "dependencies": {
1347
1346
  "accepts": "~1.3.8",
1348
1347
  "array-flatten": "1.1.1",
1349
- "body-parser": "1.20.1",
1348
+ "body-parser": "1.20.2",
1350
1349
  "content-disposition": "0.5.4",
1351
1350
  "content-type": "~1.0.4",
1352
1351
  "cookie": "0.5.0",
@@ -1490,7 +1489,7 @@
1490
1489
  }
1491
1490
  },
1492
1491
  "node_modules/flatted": {
1493
- "version": "3.2.9",
1492
+ "version": "3.3.1",
1494
1493
  "license": "ISC"
1495
1494
  },
1496
1495
  "node_modules/follow-redirects": {
@@ -1689,7 +1688,7 @@
1689
1688
  }
1690
1689
  },
1691
1690
  "node_modules/has-proto": {
1692
- "version": "1.0.1",
1691
+ "version": "1.0.3",
1693
1692
  "license": "MIT",
1694
1693
  "engines": {
1695
1694
  "node": ">= 0.4"
@@ -2261,7 +2260,7 @@
2261
2260
  }
2262
2261
  },
2263
2262
  "node_modules/node-abi": {
2264
- "version": "3.54.0",
2263
+ "version": "3.56.0",
2265
2264
  "license": "MIT",
2266
2265
  "optional": true,
2267
2266
  "dependencies": {
@@ -2477,7 +2476,7 @@
2477
2476
  }
2478
2477
  },
2479
2478
  "node_modules/prebuild-install": {
2480
- "version": "7.1.1",
2479
+ "version": "7.1.2",
2481
2480
  "license": "MIT",
2482
2481
  "optional": true,
2483
2482
  "dependencies": {
@@ -2595,7 +2594,7 @@
2595
2594
  }
2596
2595
  },
2597
2596
  "node_modules/raw-body": {
2598
- "version": "2.5.1",
2597
+ "version": "2.5.2",
2599
2598
  "license": "MIT",
2600
2599
  "dependencies": {
2601
2600
  "bytes": "3.1.2",
@@ -2844,10 +2843,10 @@
2844
2843
  }
2845
2844
  },
2846
2845
  "node_modules/side-channel": {
2847
- "version": "1.0.5",
2846
+ "version": "1.0.6",
2848
2847
  "license": "MIT",
2849
2848
  "dependencies": {
2850
- "call-bind": "^1.0.6",
2849
+ "call-bind": "^1.0.7",
2851
2850
  "es-errors": "^1.3.0",
2852
2851
  "get-intrinsic": "^1.2.4",
2853
2852
  "object-inspect": "^1.13.1"
@@ -2917,7 +2916,7 @@
2917
2916
  }
2918
2917
  },
2919
2918
  "node_modules/socks": {
2920
- "version": "2.7.3",
2919
+ "version": "2.8.1",
2921
2920
  "license": "MIT",
2922
2921
  "optional": true,
2923
2922
  "dependencies": {
@@ -3274,8 +3273,11 @@
3274
3273
  }
3275
3274
  },
3276
3275
  "node_modules/yaml": {
3277
- "version": "2.3.4",
3276
+ "version": "2.4.0",
3278
3277
  "license": "ISC",
3278
+ "bin": {
3279
+ "yaml": "bin.mjs"
3280
+ },
3279
3281
  "engines": {
3280
3282
  "node": ">= 14"
3281
3283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.6.1",
3
+ "version": "7.7.1",
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": [