@sap/cds-dk 8.4.2 → 8.5.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/CHANGELOG.md +27 -1
- package/bin/debug.js +90 -0
- package/bin/watch.js +12 -2
- package/lib/bind/userCdsrcJsonStorageProvider.js +0 -19
- package/lib/build/buildTaskEngine.js +1 -1
- package/lib/build/provider/hana/2migration.js +34 -20
- package/lib/build/provider/hana/index.js +74 -41
- package/lib/build/provider/internalBuildTaskProvider.js +1 -1
- package/lib/build/provider/mtx-extension/index.js +4 -4
- package/lib/build/provider/mtx-sidecar/index.js +2 -2
- package/lib/build/provider/nodejs/index.js +3 -19
- package/lib/build/util.js +41 -17
- package/lib/deploy/to-hana/hdiDeployUtil.js +14 -10
- package/lib/import/message.js +2 -1
- package/lib/import/odata/metadataconverter/MetadataConverter.js +5 -0
- package/lib/import/odata/v4parser.js +32 -43
- package/lib/init/add.js +26 -0
- package/lib/init/constants.js +4 -5
- package/lib/init/index.js +17 -25
- package/lib/init/merge.js +1 -4
- package/lib/init/projectReader.js +75 -9
- package/lib/init/registries/mta.js +0 -1
- package/lib/init/template/approuter/files/package.json +1 -1
- package/lib/init/template/cloud-logging/files/package.json.hbs +1 -12
- package/lib/init/template/cloud-logging/files/values.yaml.hbs +16 -0
- package/lib/init/template/cloud-logging/index.js +14 -10
- package/lib/init/template/data/as-json.js +1 -1
- package/lib/init/template/data/index.js +1 -26
- package/lib/init/template/esm/files/package.json.hbs +3 -0
- package/lib/init/template/esm/index.js +16 -0
- package/lib/init/template/handler/files/handler.xs.hbs +56 -0
- package/lib/init/template/handler/index.js +84 -9
- package/lib/init/template/helm/index.js +4 -1
- package/lib/init/template/http/index.js +102 -35
- package/lib/init/template/sample/files/nodejs/{admin-service.js → admin-service.js.hbs} +8 -1
- package/lib/init/template/sample/files/nodejs/{cat-service.js → cat-service.js.hbs} +8 -3
- package/lib/init/template/sample/index.js +4 -2
- package/lib/init/template/telemetry/files/package.json.hbs +18 -0
- package/lib/init/template/telemetry/index.js +8 -2
- package/lib/init/template/typescript/files/package.json +1 -1
- package/lib/init/template/workzone-standard/index.js +1 -1
- package/lib/init/types.d.ts +0 -6
- package/lib/watch/node-watch.js +25 -9
- package/npm-shrinkwrap.json +26 -31
- package/package.json +1 -1
package/lib/init/types.d.ts
CHANGED
package/lib/watch/node-watch.js
CHANGED
|
@@ -3,6 +3,7 @@ const LOG = cds.log('cli|watch'), DEBUG = cds.debug('cli|watch')
|
|
|
3
3
|
const { relative } = require('path')
|
|
4
4
|
|
|
5
5
|
module.exports = ({ cwd, script, ext, ignore=RegExp(), env={}, delay=200, options={} })=>{
|
|
6
|
+
const debugOpts = _debugOpts(options)
|
|
6
7
|
|
|
7
8
|
let child
|
|
8
9
|
|
|
@@ -20,18 +21,16 @@ module.exports = ({ cwd, script, ext, ignore=RegExp(), env={}, delay=200, option
|
|
|
20
21
|
|
|
21
22
|
// Re-starting child process...
|
|
22
23
|
const { fork } = require('child_process')
|
|
23
|
-
const restart = _coalesceEvents(delay, (
|
|
24
|
-
DEBUG?.('Restart', {events})
|
|
24
|
+
const restart = _coalesceEvents(delay, (eventsAndOpts) => {
|
|
25
|
+
DEBUG?.('Restart', {events: eventsAndOpts})
|
|
25
26
|
_kill (child, () => {
|
|
26
|
-
const execArgv = [...process.execArgv]
|
|
27
|
-
|
|
28
|
-
if (evt.type
|
|
29
|
-
if (evt.name
|
|
27
|
+
const execArgv = [...process.execArgv, ...debugOpts]
|
|
28
|
+
eventsAndOpts.forEach(evt => { // ad-hoc options from stdin
|
|
29
|
+
if (evt.type?.startsWith('--')) execArgv.push(evt.type)
|
|
30
|
+
if (evt.name?.startsWith('--')) execArgv.push(evt.name)
|
|
30
31
|
})
|
|
31
|
-
if (options.debug) execArgv.push('--inspect')
|
|
32
|
-
if (options['debug-brk']) execArgv.push('--inspect-brk')
|
|
33
32
|
|
|
34
|
-
const updated =
|
|
33
|
+
const updated = eventsAndOpts.filter(evt => evt.type && evt.type === 'update').map(evt => evt.name)
|
|
35
34
|
emitter.emit ('restart', updated)
|
|
36
35
|
child = fork (script, { cwd, env, stdio:'inherit', execArgv }, (err)=>{
|
|
37
36
|
if (err) console.error (err)
|
|
@@ -147,4 +146,21 @@ function _kill (child, cb=()=>{}) {
|
|
|
147
146
|
child.kill()
|
|
148
147
|
}
|
|
149
148
|
|
|
149
|
+
function _debugOpts(options={}) {
|
|
150
|
+
const o = []
|
|
151
|
+
if ('debug' in options) {
|
|
152
|
+
options.inspect = options.debug
|
|
153
|
+
delete options.debug
|
|
154
|
+
}
|
|
155
|
+
if ('inspect' in options) { // could be 0
|
|
156
|
+
if (typeof options.inspect === 'string') o.push(`--inspect=${options.inspect}`) // could be port and/or host
|
|
157
|
+
else o.push(`--inspect`)
|
|
158
|
+
}
|
|
159
|
+
if ('inspect-brk' in options) {
|
|
160
|
+
if (typeof options['inspect-brk'] === 'string') o.push(`--inspect-brk=${options['inspect-brk']}`)
|
|
161
|
+
else o.push(`--inspect-brk`)
|
|
162
|
+
}
|
|
163
|
+
return o
|
|
164
|
+
}
|
|
165
|
+
|
|
150
166
|
const _pending = Symbol.for('sap.cds.watch.pendingKill')
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sap/cds-dk",
|
|
9
|
-
"version": "8.
|
|
9
|
+
"version": "8.5.0",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@cap-js/asyncapi": "^1.0.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"node_modules/@cap-js/db-service": {
|
|
46
|
-
"version": "1.
|
|
46
|
+
"version": "1.16.0",
|
|
47
47
|
"license": "SEE LICENSE",
|
|
48
48
|
"optional": true,
|
|
49
49
|
"dependencies": {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"node_modules/@eslint/config-array": {
|
|
112
|
-
"version": "0.
|
|
112
|
+
"version": "0.19.0",
|
|
113
113
|
"license": "Apache-2.0",
|
|
114
114
|
"dependencies": {
|
|
115
115
|
"@eslint/object-schema": "^2.1.4",
|
|
@@ -121,14 +121,14 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"node_modules/@eslint/core": {
|
|
124
|
-
"version": "0.
|
|
124
|
+
"version": "0.9.0",
|
|
125
125
|
"license": "Apache-2.0",
|
|
126
126
|
"engines": {
|
|
127
127
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
"node_modules/@eslint/eslintrc": {
|
|
131
|
-
"version": "3.
|
|
131
|
+
"version": "3.2.0",
|
|
132
132
|
"license": "MIT",
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"ajv": "^6.12.4",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
151
|
"node_modules/@eslint/js": {
|
|
152
|
-
"version": "9.
|
|
152
|
+
"version": "9.15.0",
|
|
153
153
|
"license": "MIT",
|
|
154
154
|
"engines": {
|
|
155
155
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
165
|
"node_modules/@eslint/plugin-kit": {
|
|
166
|
-
"version": "0.2.
|
|
166
|
+
"version": "0.2.3",
|
|
167
167
|
"license": "Apache-2.0",
|
|
168
168
|
"dependencies": {
|
|
169
169
|
"levn": "^0.4.1"
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
"node_modules/@sap/cds": {
|
|
227
|
-
"version": "8.
|
|
227
|
+
"version": "8.5.0",
|
|
228
228
|
"license": "SEE LICENSE IN LICENSE",
|
|
229
229
|
"dependencies": {
|
|
230
230
|
"@sap/cds-compiler": ">=5.1",
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"node_modules/@sap/cds-compiler": {
|
|
253
|
-
"version": "5.
|
|
253
|
+
"version": "5.5.0",
|
|
254
254
|
"license": "SEE LICENSE IN LICENSE",
|
|
255
255
|
"dependencies": {
|
|
256
256
|
"antlr4": "4.9.3"
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
}
|
|
266
266
|
},
|
|
267
267
|
"node_modules/@sap/cds-fiori": {
|
|
268
|
-
"version": "1.2.
|
|
268
|
+
"version": "1.2.8",
|
|
269
269
|
"license": "SEE LICENSE IN LICENSE",
|
|
270
270
|
"peerDependencies": {
|
|
271
271
|
"@sap/cds": ">=7.6",
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
}
|
|
287
287
|
},
|
|
288
288
|
"node_modules/@sap/cds-mtxs": {
|
|
289
|
-
"version": "2.
|
|
289
|
+
"version": "2.4.0",
|
|
290
290
|
"license": "SEE LICENSE IN LICENSE",
|
|
291
291
|
"dependencies": {
|
|
292
292
|
"@sap/hdi-deploy": ">=4",
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
"license": "MIT"
|
|
467
467
|
},
|
|
468
468
|
"node_modules/axios": {
|
|
469
|
-
"version": "1.7.
|
|
469
|
+
"version": "1.7.8",
|
|
470
470
|
"license": "MIT",
|
|
471
471
|
"dependencies": {
|
|
472
472
|
"follow-redirects": "^1.15.6",
|
|
@@ -498,7 +498,7 @@
|
|
|
498
498
|
"optional": true
|
|
499
499
|
},
|
|
500
500
|
"node_modules/better-sqlite3": {
|
|
501
|
-
"version": "11.
|
|
501
|
+
"version": "11.6.0",
|
|
502
502
|
"hasInstallScript": true,
|
|
503
503
|
"license": "MIT",
|
|
504
504
|
"optional": true,
|
|
@@ -728,7 +728,7 @@
|
|
|
728
728
|
"license": "MIT"
|
|
729
729
|
},
|
|
730
730
|
"node_modules/cross-spawn": {
|
|
731
|
-
"version": "7.0.
|
|
731
|
+
"version": "7.0.6",
|
|
732
732
|
"license": "MIT",
|
|
733
733
|
"dependencies": {
|
|
734
734
|
"path-key": "^3.1.0",
|
|
@@ -886,24 +886,24 @@
|
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
"node_modules/eslint": {
|
|
889
|
-
"version": "9.
|
|
889
|
+
"version": "9.15.0",
|
|
890
890
|
"license": "MIT",
|
|
891
891
|
"dependencies": {
|
|
892
892
|
"@eslint-community/eslint-utils": "^4.2.0",
|
|
893
893
|
"@eslint-community/regexpp": "^4.12.1",
|
|
894
|
-
"@eslint/config-array": "^0.
|
|
895
|
-
"@eslint/core": "^0.
|
|
896
|
-
"@eslint/eslintrc": "^3.
|
|
897
|
-
"@eslint/js": "9.
|
|
898
|
-
"@eslint/plugin-kit": "^0.2.
|
|
894
|
+
"@eslint/config-array": "^0.19.0",
|
|
895
|
+
"@eslint/core": "^0.9.0",
|
|
896
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
897
|
+
"@eslint/js": "9.15.0",
|
|
898
|
+
"@eslint/plugin-kit": "^0.2.3",
|
|
899
899
|
"@humanfs/node": "^0.16.6",
|
|
900
900
|
"@humanwhocodes/module-importer": "^1.0.1",
|
|
901
|
-
"@humanwhocodes/retry": "^0.4.
|
|
901
|
+
"@humanwhocodes/retry": "^0.4.1",
|
|
902
902
|
"@types/estree": "^1.0.6",
|
|
903
903
|
"@types/json-schema": "^7.0.15",
|
|
904
904
|
"ajv": "^6.12.4",
|
|
905
905
|
"chalk": "^4.0.0",
|
|
906
|
-
"cross-spawn": "^7.0.
|
|
906
|
+
"cross-spawn": "^7.0.5",
|
|
907
907
|
"debug": "^4.3.2",
|
|
908
908
|
"escape-string-regexp": "^4.0.0",
|
|
909
909
|
"eslint-scope": "^8.2.0",
|
|
@@ -922,8 +922,7 @@
|
|
|
922
922
|
"lodash.merge": "^4.6.2",
|
|
923
923
|
"minimatch": "^3.1.2",
|
|
924
924
|
"natural-compare": "^1.4.0",
|
|
925
|
-
"optionator": "^0.9.3"
|
|
926
|
-
"text-table": "^0.2.0"
|
|
925
|
+
"optionator": "^0.9.3"
|
|
927
926
|
},
|
|
928
927
|
"bin": {
|
|
929
928
|
"eslint": "bin/eslint.js"
|
|
@@ -1179,7 +1178,7 @@
|
|
|
1179
1178
|
}
|
|
1180
1179
|
},
|
|
1181
1180
|
"node_modules/flatted": {
|
|
1182
|
-
"version": "3.3.
|
|
1181
|
+
"version": "3.3.2",
|
|
1183
1182
|
"license": "ISC"
|
|
1184
1183
|
},
|
|
1185
1184
|
"node_modules/follow-redirects": {
|
|
@@ -2211,10 +2210,6 @@
|
|
|
2211
2210
|
"node": ">=6"
|
|
2212
2211
|
}
|
|
2213
2212
|
},
|
|
2214
|
-
"node_modules/text-table": {
|
|
2215
|
-
"version": "0.2.0",
|
|
2216
|
-
"license": "MIT"
|
|
2217
|
-
},
|
|
2218
2213
|
"node_modules/to-regex-range": {
|
|
2219
2214
|
"version": "5.0.1",
|
|
2220
2215
|
"license": "MIT",
|
|
@@ -2386,7 +2381,7 @@
|
|
|
2386
2381
|
}
|
|
2387
2382
|
},
|
|
2388
2383
|
"node_modules/yaml": {
|
|
2389
|
-
"version": "2.6.
|
|
2384
|
+
"version": "2.6.1",
|
|
2390
2385
|
"license": "ISC",
|
|
2391
2386
|
"bin": {
|
|
2392
2387
|
"yaml": "bin.mjs"
|